about summary refs log tree commit diff
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2019-02-10 21:13:17 +0100
committerThibaut Girka <thib@sitedethib.com>2019-02-10 21:13:17 +0100
commit6b2eefc7bf8cf1bb58da165d9594d9b17bf97e11 (patch)
treeeca399dbfa4689eb37ce1e2e8590590c17912f7f
parentbf94a43496210bd99c5344f10f7fbf3c49fd15b8 (diff)
[Glitch] Add WebP support
Port 5092d17f2936146fa26e5d8a9b9e391f77010f28  to glitch-soc
-rw-r--r--app/javascript/flavours/glitch/util/resize_image.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/util/resize_image.js b/app/javascript/flavours/glitch/util/resize_image.js
index d1608094f..bbdbc865e 100644
--- a/app/javascript/flavours/glitch/util/resize_image.js
+++ b/app/javascript/flavours/glitch/util/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;
   }