Run Google's Guetzli within Docker.
Visit https://github.com/google/guetzli for Guetzli's full documentation
docker run --rm -v $(pwd):/data ghcr.io/jveldboom/docker-google-guetzli:latest \
input.jpg output.jpgdocker run --rm -v $(pwd):/data ghcr.io/jveldboom/docker-google-guetzli:latest \
--quality 85 ./samples/bees.png ./samples/bees-out.jpg| Original | Processed with 85% |
|---|---|
![]() 177 KB |
![]() 22 KB |
![]() 219 KB |
![]() 103 KB |
Guetzli is intentionally slow — it tries many encodings to find the best compression. Expect processing to take 1 minute or more per megapixel. It is best suited for batch or offline processing, not real-time use.
It also requires a minimum of 300 MB of memory per megapixel of input image.
# build the image locally
docker build -t docker-google-guetzli .
# run locally built image
docker run --rm -v $(pwd):/data docker-google-guetzli \
--quality 85 ./samples/bees.png ./samples/bees-out.png
# check size
docker image ls docker-google-guetzli


