Skip to content

ImageOptim

Strips metadata and recompresses PNG and JPEG files in place, without visible quality loss.

Homebrew cask Direct download

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.Get plus .Resize/.Process) covers most of this without a manual step.

Alternative to

AlternativeTypeTrade-off
SquooshFreeGoogle’s web-based compressor, with a live quality comparison
TinyPNGFreemiumThe well-known web and API service
oxipng, pngquant and jpegoptimOpen sourceThe same engines from the command line
Hugo, Sharp or vips in a build stepOpen sourceBetter than optimising by hand at all

Install

brew install --cask imageoptim

Links

This post is licensed under CC BY 4.0 by the author.
Last updated on