diff --git a/packages/lib/mime-utils-types.js b/packages/lib/mime-utils-types.js index 4a73d2a09..d5db4ab29 100644 --- a/packages/lib/mime-utils-types.js +++ b/packages/lib/mime-utils-types.js @@ -776,7 +776,10 @@ const mimeTypes = [ { t: 'x-conference/x-cooltalk', e: ['ice'] }, ]; -// Note: if the list above is ever updated, make sure Markdown doesn't appear twice +// Note: if the list above is ever updated, make sure Markdown doesn't appear +// twice. In general, put any change here, so that we know what differs from the +// original list. mimeTypes.push({ t: 'text/markdown', e: ['md', 'markdown'] }); +mimeTypes.push({ t: 'image/avif', e: ['avif'] }); module.exports = mimeTypes; diff --git a/packages/lib/models/Resource.ts b/packages/lib/models/Resource.ts index 9f99a6a56..6cb8083b3 100644 --- a/packages/lib/models/Resource.ts +++ b/packages/lib/models/Resource.ts @@ -48,7 +48,7 @@ export default class Resource extends BaseItem { } public static isSupportedImageMimeType(type: string) { - const imageMimeTypes = ['image/jpg', 'image/jpeg', 'image/png', 'image/gif', 'image/svg+xml', 'image/webp']; + const imageMimeTypes = ['image/jpg', 'image/jpeg', 'image/png', 'image/gif', 'image/svg+xml', 'image/webp', 'image/avif']; return imageMimeTypes.indexOf(type.toLowerCase()) >= 0; }