Add gif to if-statement to not convert

- SVGs are already there, so I just added it alongside it (as recommended by https://github.com/nextcloud/server/issues/16232#issuecomment-679920284)

Signed-off-by: Jacob Neplokh <me@jacobneplokh.com>
This commit is contained in:
Jacob Neplokh 2020-10-27 13:26:54 -07:00
parent 65375320fb
commit ef8822d3c7
No known key found for this signature in database
GPG Key ID: E4050DE078D551BA
1 changed files with 1 additions and 1 deletions

View File

@ -223,7 +223,7 @@ class ImageManager {
throw new \Exception('Unsupported image type');
}
if ($key === 'background' && strpos($detectedMimeType, 'image/svg') === false) {
if ($key === 'background' && strpos($detectedMimeType, 'image/svg') === false && strpos($detectedMimeType, 'image/gif') === false) {
// Optimize the image since some people may upload images that will be
// either to big or are not progressive rendering.
$newImage = @imagecreatefromstring(file_get_contents($tmpFile));