From 4c1c42ad40919e15b9813ab6b95af70793e1d737 Mon Sep 17 00:00:00 2001 From: joyqi Date: Mon, 23 Oct 2023 18:38:40 +0800 Subject: [PATCH] Add svg to image types --- var/Widget/Base/Contents.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/Widget/Base/Contents.php b/var/Widget/Base/Contents.php index 8e155f4d..7b83e1fe 100644 --- a/var/Widget/Base/Contents.php +++ b/var/Widget/Base/Contents.php @@ -554,7 +554,7 @@ class Contents extends Base implements QueryInterface //增加数据信息 $value['attachment'] = new Config($content); - $value['attachment']->isImage = in_array($content['type'], ['jpg', 'jpeg', 'gif', 'png', 'tiff', 'bmp', 'webp', 'avif']); + $value['attachment']->isImage = in_array($content['type'], ['jpg', 'jpeg', 'gif', 'png', 'tiff', 'bmp', 'webp', 'avif', 'svg']); $value['attachment']->url = Upload::attachmentHandle($value); if ($value['attachment']->isImage) {