From ef8822d3c71c436d20dbd0c51f469d6136cfe4e6 Mon Sep 17 00:00:00 2001 From: Jacob Neplokh Date: Tue, 27 Oct 2020 13:26:54 -0700 Subject: [PATCH] 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 --- apps/theming/lib/ImageManager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/theming/lib/ImageManager.php b/apps/theming/lib/ImageManager.php index a50522cd89549..7f9b410ff9c14 100644 --- a/apps/theming/lib/ImageManager.php +++ b/apps/theming/lib/ImageManager.php @@ -223,7 +223,7 @@ public function updateImage(string $key, string $tmpFile) { 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));