Commit 0270afcf authored by 郭志伟's avatar 郭志伟

feat: 更新图片优化策略

parent fe51a847
......@@ -2,12 +2,20 @@
* @Description: 根据商品来源匹配
* @Date: 2021-04-26 17:47:15
* @LastEditors: gzw
* @LastEditTime: 2021-07-19 15:12:34
* @LastEditTime: 2022-06-28 17:41:02
*/
// const aliRule =
// '?x-oss-process=image/resize,l_180,s_180,m_mfit/quality,q_70/interlace,1';
const rules = [
{
name: 'ali',
reg: 'img.lkbang',
rule: [
`?x-oss-process=image/resize,l_220,s_220,m_mfit/quality,q_70/interlace,1`, // png 需要改尺寸
`?x-oss-process=image/resize,l_360,s_360,m_mfit/quality,q_70/interlace,1`
]
},
{
name: 'qiniu',
reg: 'kdspstatic',
......@@ -24,15 +32,15 @@ const rules = [
{ from: 'jfs', to: 's220x220_jfs' },
{ from: 'jfs', to: 's360x360_jfs' }
]
},
{
name: 'tencent',
reg: 'img.lkbang',
rule: [
'?imageMogr2/thumbnail/220x220/quality/75/interlace/1',
'?imageMogr2/thumbnail/360x360/quality/75/interlace/1'
]
}
// {
// name: 'tencent',
// reg: 'img.lkbang',
// rule: [
// '?imageMogr2/thumbnail/220x220/quality/75/interlace/1',
// '?imageMogr2/thumbnail/360x360/quality/75/interlace/1'
// ]
// }
];
export default function Img2Thumb(url, level = 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment