ImageOptim
Strips metadata and recompresses PNG and JPEG files in place, without visible quality loss.
What it does
ImageOptim runs a pipeline of optimisers — Zopfli, PNGOUT, OxiPNG, AdvPNG, MozJPEG, Guetzli — and keeps whichever produces the smallest file. It also strips EXIF, colour profiles and thumbnails, which on a photo straight from a phone is frequently the majority of the payload.
Files are replaced in place, so the workflow is dragging a folder onto the window.
Notes
- Lossy mode exists and is off by default; leave it off when the source is the only copy.
- Stripping EXIF removes GPS coordinates — worth doing on anything about to be published from a home address.
- For build-time optimisation Hugo’s own image pipeline (
resources.Getplus.Resize/.Process) covers most of this without a manual step.
Alternative to
| Alternative | Type | Trade-off |
|---|---|---|
| Squoosh | Free | Google’s web-based compressor, with a live quality comparison |
| TinyPNG | Freemium | The well-known web and API service |
| oxipng, pngquant and jpegoptim | Open source | The same engines from the command line |
| Hugo, Sharp or vips in a build step | Open source | Better than optimising by hand at all |
Install
brew install --cask imageoptim