Merge pull request #23737 from nextcloud/fix-gif-login-image

Fix GIF being converted when used as a login image
This commit is contained in:
Julius Härtl 2020-11-03 10:31:42 +01:00 committed by GitHub
commit e9af7b84f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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));