From 6b2eefc7bf8cf1bb58da165d9594d9b17bf97e11 Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Sun, 10 Feb 2019 21:13:17 +0100 Subject: [PATCH] [Glitch] Add WebP support Port 5092d17f2936146fa26e5d8a9b9e391f77010f28 to glitch-soc --- app/javascript/flavours/glitch/util/resize_image.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/javascript/flavours/glitch/util/resize_image.js b/app/javascript/flavours/glitch/util/resize_image.js index d1608094f7f..bbdbc865e9e 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; }