image_optim
image_optim copied to clipboard
Optimize images using multiple utilities
I did some trial and error on using [pngquant](https://github.com/kornelski/pngquant) through this Ruby _gem_ (_image_optim_) and through command line and how its results compare to [TinyPNG](https://tinypng.com/)/[Kraken](https://kraken.io/)/[ImageAlpha](https://pngmini.com/)+[ImageOptim](https://imageoptim.com/mac). It seems to me that...
…tmp files useful for environments where a foreground task and background task are run by different users
I added the option to select the compression method, with the same ssim default. Didn't want to introduce many changes, so I opted for the `Array` type option and grabbed...
Currently, the original image gets overwritten if the optimized version is larger (happens in some cases). Changing it so that only the smaller image is preserved when `optimize_image!` is called.
`cwebp` can already help for lossless opitimisation (`-lossless` without `-exact`, `-z` with high values, `-metadata none`)
`cat a.jpg | image_optim - > b.jpg`?
[Version 2](https://github.com/svg/svgo/releases/tag/v2.0.0) has CLI changes, which makes it incompatible with `image_optim`. I have not dug into the code to see how the different versions can be handled, but for now,...
Hi again @toy. I have a service which runs a script which runs `image_optim` over an entire WordPress uploads directory, so I also keep a cache of previously-optimized images using...
Code Example ```ruby params = { pngout: false, advpng: false, jhead: false, jpegtran: false, jpegrecompress: false, svgo: false, optipng: false, pngquant: false, jpegoptim: { allow_lossy: true, max_quality: 85 }} ImageOptim.new(params).optimize_image!("/tmp/image.jpg")...