vbenjs / vite-plugin-imagemin

A vite plugin for compressing image assets.
MIT License
212 stars 28 forks source link

imagemin error #7

Open 823239259 opened 3 years ago

823239259 commented 3 years ago

I encountered this problem, the size of the picture cannot be compressed.

viteImagemin({ gifsicle: { optimizationLevel: 7, interlaced: false }, optipng: { optimizationLevel: 7 }, mozjpeg: { quality: 20 }, pngquant: { quality: [0.8, 0.9], speed: 4 }, svgo: { plugins: [ { name: "removeViewBox" }, { name: "removeEmptyAttrs", active: false } ] } })

image

anncwb commented 3 years ago

I can try, can you give me a Reproduce? image

love51854560 commented 3 years ago

I can try, can you give me a Reproduce? image

I encountered same problem,It can be compressed successfully locally,but failed in jenkins:

In local: ✨ [vite-plugin-imagemin]- compressed image resource successfully: dist/assets/logo.7ffb94ff.png -46% 12.06kb / tiny: 6.60kb dist/assets/background.3dfa46d5.png -97% 2349.62kb / tiny: 92.36kb

In jenkins: imagemin error:/var/jenkins_home/workspace/tsp-web/dist/assets/logo.7ffb94ff.png imagemin error:/var/jenkins_home/workspace/tsp-web/dist/assets/background.3dfa46d5.png

anncwb commented 3 years ago

尝试在linux安装下 https://vvbin.cn/doc-next/other/faq.html#%E5%9C%A8-linux-%E5%86%85%E4%BE%9D%E8%B5%96%E5%AE%89%E8%A3%85%E5%A4%B1%E8%B4%A5

phillduffy commented 3 years ago

I have been having this issue for a few weeks, I tried disabling the svgo section of my vite.config.js and I am back in business...

Minori-ty commented 3 years ago

同样是不起作用,测试了几个项目都是不起作用。不知道该怎么给你复现的demo

cm159289 commented 3 years ago

oh,还是不行,都是ts配置才行吗

lxy030988 commented 2 years ago

image

lxy030988 commented 2 years ago

我也碰到这个问题了

shmilytp commented 10 months ago

请问这个问题有人解决吗

Minori-ty commented 10 months ago

请问这个问题有人解决吗

用yarn下载