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
|
@ -114,7 +114,7 @@ export class FileServerService {
|
|||
|
||||
const convertFile = async () => {
|
||||
if (isThumbnail) {
|
||||
if (['image/jpeg', 'image/webp', 'image/png', 'image/svg+xml'].includes(mime)) {
|
||||
if (['image/jpeg', 'image/webp', 'image/avif', 'image/png', 'image/svg+xml'].includes(mime)) {
|
||||
return await this.imageProcessingService.convertToWebp(path, 498, 280);
|
||||
} else if (mime.startsWith('video/')) {
|
||||
return await this.videoProcessingService.generateVideoThumbnail(path);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue