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
1 changed files with 1 additions and 2 deletions
|
@ -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 a new issue