From 676831746919491b5c607b0ab896b5adac3dc7df Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Fri, 26 Feb 2021 12:01:57 +0100 Subject: [PATCH] Disable attachment scaling for GIFs Resolves #4030 --- wcfsetup/install/files/js/WCF.Attachment.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wcfsetup/install/files/js/WCF.Attachment.js b/wcfsetup/install/files/js/WCF.Attachment.js index 80c031f577..34ff910301 100644 --- a/wcfsetup/install/files/js/WCF.Attachment.js +++ b/wcfsetup/install/files/js/WCF.Attachment.js @@ -335,8 +335,9 @@ WCF.Attachment.Upload = WCF.Upload.extend({ // As our resizer is based on Pica it will use multiple workers per image if possible. promise = Array.prototype.reduce.call(files, (function (acc, file) { return acc.then((function (arr) { - // Ignore anything that is not one of the 3 basic image types. - if (['image/png', 'image/gif', 'image/jpeg'].indexOf(file.type) === -1) { + // Ignore anything that is neither PNG nor JPEG. GIFs are not supported + // due to the support for animations. + if (['image/png', 'image/jpeg'].indexOf(file.type) === -1) { arr.push(file); return arr; } -- 2.20.1