about summary refs log tree commit diff
path: root/app/javascript/mastodon/utils/resize_image.js
diff options
context:
space:
mode:
authorAcid Chicken (硫酸鶏) <root@acid-chicken.com>2019-02-02 20:25:04 +0900
committerEugen Rochko <eugen@zeonfederated.com>2019-02-02 12:25:04 +0100
commit5092d17f2936146fa26e5d8a9b9e391f77010f28 (patch)
tree6cf36df80ff7cfc402cc52a4b0f4f85f62210fd5 /app/javascript/mastodon/utils/resize_image.js
parentb253d3e0c2591700f597ad63a93bc62c5f48409d (diff)
Add WebP support (#9879)
* Add WebP support

* Remove the changes to the tooltip

refs: https://github.com/tootsuite/mastodon/pull/9879#pullrequestreview-199312528
Diffstat (limited to 'app/javascript/mastodon/utils/resize_image.js')
-rw-r--r--app/javascript/mastodon/utils/resize_image.js2
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 d1608094f..bbdbc865e 100644
--- a/app/javascript/mastodon/utils/resize_image.js
+++ b/app/javascript/mastodon/utils/resize_image.js
@@ -31,7 +31,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;
   }