diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2020-03-02 07:40:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-02 07:40:01 +0100 |
commit | 1ef982a967293c2c108fb2ca834c9be6b13561bc (patch) | |
tree | eb43d80eee6d35324061d7c74b60b85c9e80e342 | |
parent | 351cd95777e9c3b54817d058b9222befa53c0bfe (diff) | |
parent | e35b76a12b3f5a580fafb0cf408e868d45908bc5 (diff) | |
download | nextcloud-server-1ef982a967293c2c108fb2ca834c9be6b13561bc.tar.gz nextcloud-server-1ef982a967293c2c108fb2ca834c9be6b13561bc.zip |
Merge pull request #19722 from nextcloud/bug/18727/dont-resize-svg
Don't try to resize a svg uploaded as background image
-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')); |