From 379a7a7ca7cf913cbc130a6323f821b534fc14c4 Mon Sep 17 00:00:00 2001 From: Alexander Ivanov Date: Sat, 28 May 2022 02:06:40 +0800 Subject: Add support for webp uploads (#18506) --- app/javascript/mastodon/utils/resize_image.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/javascript') diff --git a/app/javascript/mastodon/utils/resize_image.js b/app/javascript/mastodon/utils/resize_image.js index 22ff86801..fb8c3c11e 100644 --- a/app/javascript/mastodon/utils/resize_image.js +++ b/app/javascript/mastodon/utils/resize_image.js @@ -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; } -- cgit