Skip to content

Commit

Permalink
Merge pull request #23737 from nextcloud/fix-gif-login-image
Browse files Browse the repository at this point in the history
Fix GIF being converted when used as a login image
  • Loading branch information
juliushaertl committed Nov 3, 2020
2 parents 1c05c9f + ef8822d commit e9af7b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/theming/lib/ImageManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit e9af7b8

Please sign in to comment.