psliwa / image-optimizer

Image optimization / compression library. This library is able to optimize png, jpg and gif files in very easy and handy way. It uses optipng, pngquant, pngcrush, pngout, gifsicle, jpegoptim and jpegtran tools.
MIT License
909 stars 141 forks source link

pngquant makes small images larger in rare cases #60

Closed ghost closed 5 years ago

ghost commented 6 years ago

This can also occur to optipng, but it is smart enough to skip the process if the output is larger than the input.

Apparently pngquant also has an option for this via --skip-if-larger, but it is not passed in the defaults in the OptimizerFactory.

Would it be possible to enable this option by default? I can enable it myself, of course, but it would be a more sane default that would improve usage for everyone :smile: .

psliwa commented 5 years ago

Fixed.