guetzli
Encode JPEG images for smaller file size
TLDR
Compress a JPEG image
Create a compressed JPEG from a PNG
Compress a JPEG with the desired visual quality (84-100)
SYNOPSIS
guetzli [--quality N] [--verbose] input.png output.jpg
PARAMETERS
--quality N
Target quality factor (0-100, default 95). Higher values yield better quality but larger files, measured in butteraugli distance.
--verbose
Print detailed progress information during encoding.
DESCRIPTION
Guetzli is an open-source JPEG encoder developed by Google that achieves dramatically better compression than libjpeg while maintaining visual quality. It uses a novel approach based on the Butteraugli perceptual metric, which measures differences in images as perceived by the human eye.
Unlike traditional JPEG tools, guetzli starts with a lossless input like PNG and iteratively optimizes DCT coefficients and quantization tables to minimize butteraugli distance at a target bitrate. This results in images with fewer artifacts, richer colors, and finer details at the same file size.
Ideal for web graphics, photography, and any scenario prioritizing quality over encoding speed. However, its computational intensity makes it unsuitable for real-time use.
CAVEATS
Extremely slow encoding (minutes to hours per image, scaling poorly with resolution). Requires lossless input (PNG recommended). No multi-threading support. May crash on malformed inputs or very large images (>20MP).
USAGE EXAMPLE
guetzli --quality 94 image.png compressed.jpg
Produces high-quality JPEG from PNG input.
INPUT REQUIREMENTS
Input must be 8-bit PNG (RGB or grayscale). Supports baseline JPEG profile only in output.
HISTORY
Developed by Google engineers and open-sourced in January 2017 under Apache 2.0. Based on Butteraugli (2016). Maintenance discontinued around 2018 in favor of JPEG XL and other formats; source remains on GitHub.


