Browse Source

remove image type support for svg

master
filesite 11 hours ago
parent
commit
1cf8ba29e4
  1. 2
      config.mjs
  2. 2
      lib/common.mjs

2
config.mjs

@ -34,7 +34,7 @@ let configs = {
height: 900 height: 900
}, },
minImageNaturalWidth: 50, //从<img>标签抓取封面图时的图片原始尺寸最小宽度 minImageNaturalWidth: 150, //从<img>标签抓取封面图时的图片原始尺寸最小宽度
//可选项参考官方文档:https://ulixee.org/docs/hero/basic-client/hero //可选项参考官方文档:https://ulixee.org/docs/hero/basic-client/hero
botOptions: { botOptions: {

2
lib/common.mjs

@ -63,8 +63,6 @@ export default {
imgType = 'webp'; imgType = 'webp';
}else if (/\.gif/ig.test(url) || /image\/gif/ig.test(url)) { }else if (/\.gif/ig.test(url) || /image\/gif/ig.test(url)) {
imgType = 'gif'; imgType = 'gif';
}else if (/\.svg/ig.test(url) || /image\/svg\+xml/ig.test(url)) {
imgType = 'svg+xml';
} }
return imgType; return imgType;

Loading…
Cancel
Save