diff options
author | Alexander Ivanov <saiv46.dev@gmail.com> | 2022-05-28 02:06:40 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-27 20:06:40 +0200 |
commit | 379a7a7ca7cf913cbc130a6323f821b534fc14c4 (patch) | |
tree | 9c7ba4d86521031d3e8bc32509240d77c04ab47f /app/javascript | |
parent | d21251f8fe318ca468d14134dd767382447249de (diff) |
Add support for webp uploads (#18506)
Diffstat (limited to 'app/javascript')
-rw-r--r-- | app/javascript/mastodon/utils/resize_image.js | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |