Reputation: 485
I am trying to use imagemin to compress images in an npm task. I am able to get the image slightly compressed using:
imagemin src/images/*.jpg -o dist/images --plugin=jpegtran
but I can't find anything in the imagemin-cli docs on how to pass an option to set the amount of compression.
Upvotes: 2
Views: 1889
Reputation: 18969
You are using the jpegtran plugin which uses lossless algorithms. That means you can't do much to adjust the compression, as the algorithms behind it are unable reduce the quality of the image.
If you want more compression you have to use lossy compression plugins, such as jpeg-recompress or jpegoptim.
Upvotes: 1