enhance: AVIF support (#9281)
* chore: Make image/avif browsersafe * server side * change FileInfoService * ✌️ * avifはMastodonでは絶望的 see https://github.com/misskey-dev/misskey/issues/9283 Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
This commit is contained in:
parent
bd35d0fb2a
commit
e81c2962a0
8 changed files with 38 additions and 10 deletions
|
@ -89,7 +89,7 @@ export class DriveFileEntityService {
|
|||
}
|
||||
}
|
||||
|
||||
const isImage = file.type && ['image/png', 'image/apng', 'image/gif', 'image/jpeg', 'image/webp', 'image/svg+xml'].includes(file.type);
|
||||
const isImage = file.type && ['image/png', 'image/apng', 'image/gif', 'image/jpeg', 'image/webp', 'image/avif', 'image/svg+xml'].includes(file.type);
|
||||
|
||||
return thumbnail ? (file.thumbnailUrl ?? (isImage ? (file.webpublicUrl ?? file.url) : null)) : (file.webpublicUrl ?? file.url);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue