From 5092d17f2936146fa26e5d8a9b9e391f77010f28 Mon Sep 17 00:00:00 2001 From: "Acid Chicken (硫酸鶏)" Date: Sat, 2 Feb 2019 20:25:04 +0900 Subject: Add WebP support (#9879) * Add WebP support * Remove the changes to the tooltip refs: https://github.com/tootsuite/mastodon/pull/9879#pullrequestreview-199312528 --- 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 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; } -- cgit