浏览代码

Add gif to if-statement to not convert

- SVGs are already there, so I just added it alongside it (as recommended by https://github.com/nextcloud/server/issues/16232#issuecomment-679920284)

Signed-off-by: Jacob Neplokh <me@jacobneplokh.com>
tags/v21.0.0beta1
Jacob Neplokh 3 年前
父节点
当前提交
ef8822d3c7
没有帐户链接到提交者的电子邮件
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1
    1
      apps/theming/lib/ImageManager.php

+ 1
- 1
apps/theming/lib/ImageManager.php 查看文件

@@ -223,7 +223,7 @@ class ImageManager {
throw new \Exception('Unsupported image type');
}

if ($key === 'background' && strpos($detectedMimeType, 'image/svg') === false) {
if ($key === 'background' && strpos($detectedMimeType, 'image/svg') === false && strpos($detectedMimeType, 'image/gif') === 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($tmpFile));

正在加载...
取消
保存