Skip to content
Snippets Groups Projects
Unverified Commit e35b76a1 authored by Daniel Kesselberg's avatar Daniel Kesselberg
Browse files

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: default avatarDaniel Kesselberg <mail@danielkesselberg.de>
parent 72cc8270
No related branches found
No related tags found
No related merge requests found
......@@ -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'));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment