Closed chojnicki closed 3 years ago
I will look at it later
This is caused by webp。
webp: {
quality: 75,
}
imagemin will first read the configuration of webp to compress jpg and png. So just set webp to false You can also upgrade to version 0.2.7. The default webp is set to false, and the webp configuration is deleted in vite.config.ts
Thanks!
Hi. Thanks for this plugin :) I was using Imagemin with webpack for years without problems, but cannot force it to work with Vite.
Fresh Vite install with Vue 3:
It does not matter what I type in mozjpeg quality or optipng optimizationLevel because I will always get same assets.
dist/assets/logo.03d6d6da.png -69% 6.69kb / tiny: 2.08kb dist/assets/test.6ece58c0.jpg -83% 3522.61kb / tiny: 616.63kb
So .jpg 10% and 100% results in same size.
Also, it is the same after disabling mozjpeg by
mozjpeg: false
It looks like config is ignored, but this:
does actually disable compressing, so config is not ignored if it recognizes this option. What is going on?