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>
This commit is contained in:
parent
72cc8270cd
commit
e35b76a12b
|
@ -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'));
|
||||
|
|
Loading…
Reference in New Issue