Browse Source

Merge branch 'allow-apng' into 'develop'

file_type.service: allow apng images to be rendered

See merge request pleroma/pleroma-fe!1877
HJ 1 year ago
parent
commit
a98e241a81
2 changed files with 2 additions and 1 deletions
  1. 1 0
      changelog.d/add-apng.add
  2. 1 1
      src/services/file_type/file_type.service.js

+ 1 - 0
changelog.d/add-apng.add

@@ -0,0 +1 @@
+Make Pleroma FE to also view apng (Animated PNG) attachment.

+ 1 - 1
src/services/file_type/file_type.service.js

@@ -26,7 +26,7 @@ export const fileType = mimetype => {
 }
 }
 
 
 export const fileTypeExt = url => {
 export const fileTypeExt = url => {
-  if (url.match(/\.(png|jpe?g|gif|webp|avif)$/)) {
+  if (url.match(/\.(a?png|jpe?g|gif|webp|avif)$/)) {
     return 'image'
     return 'image'
   }
   }
   if (url.match(/\.(ogv|mp4|webm|mov)$/)) {
   if (url.match(/\.(ogv|mp4|webm|mov)$/)) {