diff --git a/var/Widget/Base/Contents.php b/var/Widget/Base/Contents.php index 43b40501..184827aa 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']); + $value['attachment']->isImage = in_array($content['type'], ['jpg', 'jpeg', 'gif', 'png', 'tiff', 'bmp', 'webp']); $value['attachment']->url = Upload::attachmentHandle($value); if ($value['attachment']->isImage) { diff --git a/var/Widget/Themes/Rows.php b/var/Widget/Themes/Rows.php index 5a5b1ef3..5fdbdf82 100644 --- a/var/Widget/Themes/Rows.php +++ b/var/Widget/Themes/Rows.php @@ -45,7 +45,7 @@ class Rows extends Widget } $screen = array_filter(glob($theme . '/*'), function ($path) { - return preg_match("/screenshot\.(jpg|png|gif|bmp|jpeg)$/i", $path); + return preg_match("/screenshot\.(jpg|png|gif|bmp|jpeg|webp)$/i", $path); }); if ($screen) {