0
0
Fork 0

Add support for webp uploads (#18506)

This commit is contained in:
Alexander Ivanov 2022-05-28 02:06:40 +08:00 committed by GitHub
parent d21251f8fe
commit 379a7a7ca7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 7 additions and 7 deletions

View file

@ -109,7 +109,7 @@ const loadImage = inputFile => new Promise((resolve, reject) => {
});
const getOrientation = (img, type = 'image/png') => new Promise(resolve => {
if (type !== 'image/jpeg') {
if (!['image/jpeg', 'image/webp'].includes(type)) {
resolve(1);
return;
}