Compressing jpg images with Guetzli

Guetzli is a JPEG encoder that aims for excellent compression density at high visual quality. Guetzli generates only sequential (nonprogressive) images of the same quality generated by libjpeg. ) JPEGs due to faster decompression speeds they offer. Guetzli is a JPEG encoder that achieves excellent compression ratios with high quality, Guetzli typically generates jpegs that are 20-30% smaller than those generated by libjpeg.

So Guetzli is in fact an image encoding that is fully compatible with jpg decoding while having a high quality and high compression ratio.


Installing dependencies

On Debian/Ubuntu

``zsh apt-get install libpng-dev

On CentOS/RH

yum install libpng-devel

On Fedora

``zsh dnf install libpng-devel

On ArchLinux

pacman -S libpng

On Alpine Linux

``zsh apk add libpng-dev

###### compiled from source

git clone
cd guetzli/

The compiled binary file is located at bin/Release/guetzli.


The compiled binary file is ready to use.
Guetzli supports both jpg and png image encoding and compression.

zsh guetzli [--quality Q] [--verbose] original.png output.jpg guetzli [--quality Q] [--verbose] original.jpg output.jpg The –quality` parameter is the quality, the value of 100~85, the default is 95.
Compress a size of 1200x900 file size of 337kb image for example, the default compressed image size 254k.

  • Before Compression
  • :: Compressed

Compare with other pictures

image type image size compatibility notes
The best of the best.      
This is a very long encoding and takes a lot of memory. It takes a lot of time and memory to encode.      
png large best png
Only Chrome and Android are supported natively. Non-native platforms require specific programs to do the coding and decoding, which consumes extra time.      

For certain applications, it is useful to compress jpg images with Guetzli in a single pass.


ChromeLabs has open sourced a new tool that integrates several of the more well-known tools.
One of them is MozJPEG for more efficient re-encoding of jpg.