From 0fe11ef337dd8872455b30d900f7c20118329e24 Mon Sep 17 00:00:00 2001 From: Rafael dos Santos Silva Date: Fri, 5 Jan 2024 12:18:48 -0300 Subject: [PATCH] FIX: Stop optimizing WEBPs into JPGs (#25140) This rarely results in better compression, and there are many uses of animated WEBPs too --- .../discourse/app/services/media-optimization-worker.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/app/services/media-optimization-worker.js b/app/assets/javascripts/discourse/app/services/media-optimization-worker.js index ee5ac840a91..941894a424e 100644 --- a/app/assets/javascripts/discourse/app/services/media-optimization-worker.js +++ b/app/assets/javascripts/discourse/app/services/media-optimization-worker.js @@ -37,7 +37,7 @@ export default class MediaOptimizationWorkerService extends Service { : true; let file = data; - if (!/(\.|\/)(jpe?g|png|webp)$/i.test(file.type)) { + if (!/(\.|\/)(jpe?g|png)$/i.test(file.type)) { return Promise.resolve(); } if (