mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-21 09:38:01 +02:00
Desktop: Resolves #8175: Add support for AVIF image format
This commit is contained in:
parent
8dfcec249f
commit
90a8d704c1
@ -776,7 +776,10 @@ const mimeTypes = [
|
|||||||
{ t: 'x-conference/x-cooltalk', e: ['ice'] },
|
{ 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: 'text/markdown', e: ['md', 'markdown'] });
|
||||||
|
mimeTypes.push({ t: 'image/avif', e: ['avif'] });
|
||||||
|
|
||||||
module.exports = mimeTypes;
|
module.exports = mimeTypes;
|
||||||
|
@ -48,7 +48,7 @@ export default class Resource extends BaseItem {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static isSupportedImageMimeType(type: string) {
|
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;
|
return imageMimeTypes.indexOf(type.toLowerCase()) >= 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user