diff options
author | Daniel Kesselberg <mail@danielkesselberg.de> | 2020-03-01 02:34:28 +0300 |
---|---|---|
committer | Daniel Kesselberg <mail@danielkesselberg.de> | 2020-03-01 23:19:07 +0300 |
commit | e35b76a12b3f5a580fafb0cf408e868d45908bc5 (patch) | |
tree | 6dcba553d975e7ddbfa155561c65e56e6ede83e4 /apps | |
parent | 72cc8270cdd0f1c95ef1708be81cf4ac424dca47 (diff) |
Don't try to resize a svg uploaded as background image.
image* are gd functions without support for svg hence we are not able to resize svg.
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/theming/lib/Controller/ThemingController.php | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/apps/theming/lib/Controller/ThemingController.php b/apps/theming/lib/Controller/ThemingController.php index b7e878f2e7e..d043c64f853 100644 --- a/apps/theming/lib/Controller/ThemingController.php +++ b/apps/theming/lib/Controller/ThemingController.php @@ -280,8 +280,7 @@ class ThemingController extends Controller { ); } - $resizeKeys = ['background']; - if (in_array($key, $resizeKeys, true)) { + if ($key === 'background' && strpos($detectedMimeType, 'image/svg') === 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($image['tmp_name'], 'r')); |