Merge pull request #19722 from nextcloud/bug/18727/dont-resize-svg
Don't try to resize a svg uploaded as background image
This commit is contained in:
commit
1ef982a967
|
@ -280,8 +280,7 @@ class ThemingController extends Controller {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$resizeKeys = ['background'];
|
if ($key === 'background' && strpos($detectedMimeType, 'image/svg') === false) {
|
||||||
if (in_array($key, $resizeKeys, true)) {
|
|
||||||
// Optimize the image since some people may upload images that will be
|
// Optimize the image since some people may upload images that will be
|
||||||
// either to big or are not progressive rendering.
|
// either to big or are not progressive rendering.
|
||||||
$newImage = @imagecreatefromstring(file_get_contents($image['tmp_name'], 'r'));
|
$newImage = @imagecreatefromstring(file_get_contents($image['tmp_name'], 'r'));
|
||||||
|
|
Loading…
Reference in New Issue