all: add support for webp images

Includes webp test image
Merges #283
This commit is contained in:
neobooru
2019-10-05 16:34:12 +02:00
committed by Shyam Sunder
parent f4afb145d6
commit 73c53fa4e2
6 changed files with 11 additions and 1 deletions

View File

@ -13,6 +13,7 @@ function _mimeTypeToPostType(mimeType) {
'image/gif': 'image',
'image/jpeg': 'image',
'image/png': 'image',
'image/webp': 'image',
'video/mp4': 'video',
'video/webm': 'video',
}[mimeType] || 'unknown';
@ -113,6 +114,7 @@ class Url extends Uploadable {
'jpg': 'image/jpeg',
'png': 'image/png',
'gif': 'image/gif',
'webp': 'image/webp',
'mp4': 'video/mp4',
'webm': 'video/webm',
};