From: Tim Düsterhus Date: Fri, 26 Feb 2021 11:01:57 +0000 (+0100) Subject: Disable attachment scaling for GIFs X-Git-Tag: 5.3.5~5 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=676831746919491b5c607b0ab896b5adac3dc7df;p=GitHub%2FWoltLab%2FWCF.git Disable attachment scaling for GIFs Resolves #4030 --- 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; }