From 1cf8ba29e44ef6845ebd52ee0e6b9caf4e4ab297 Mon Sep 17 00:00:00 2001 From: filesite Date: Fri, 27 Jun 2025 12:02:10 +0800 Subject: [PATCH] remove image type support for svg --- config.mjs | 2 +- lib/common.mjs | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/config.mjs b/config.mjs index a0b6ce8..5e85c8d 100644 --- a/config.mjs +++ b/config.mjs @@ -34,7 +34,7 @@ let configs = { height: 900 }, - minImageNaturalWidth: 50, //从标签抓取封面图时的图片原始尺寸最小宽度 + minImageNaturalWidth: 150, //从标签抓取封面图时的图片原始尺寸最小宽度 //可选项参考官方文档:https://ulixee.org/docs/hero/basic-client/hero botOptions: { diff --git a/lib/common.mjs b/lib/common.mjs index a4a51e4..5dc966b 100644 --- a/lib/common.mjs +++ b/lib/common.mjs @@ -63,8 +63,6 @@ export default { imgType = 'webp'; }else if (/\.gif/ig.test(url) || /image\/gif/ig.test(url)) { imgType = 'gif'; - }else if (/\.svg/ig.test(url) || /image\/svg\+xml/ig.test(url)) { - imgType = 'svg+xml'; } return imgType;