Google open-sources JPEG encoder that reduces file sizes by 35%

Google, chrome

If you’re building an app or site that stores, manipulates or serves a lot of images, you’ll want to consider implementing Google’s new image compression algorithm, which promises to reduce JPEG file sizes by 35 percent more than other methods.

It’s called Guetzli, and it works with existing browsers and image processing tools. Google says it allows for small file sizes without compromising much on image quality by targeting what’s known as the quantization stage of the compression process, which is where algorithms can squish files but end up with poorer quality images.

However, it’s worth noting that Guetzli is slower than other options out there. Its psychovisual model “approximates color perception and visual masking in a more thorough and detailed way than what is achievable by simpler color transforms and the discrete cosine transform,” and the search algorithm that Guetzli uses to achieve this is slower than alternatives like libjpeg.

Credit: Google Research Blog

Credit: Google Research Blog

In the examples above, you can see the uncompressed original image on the left, libjpeg in the middle and Guetzli’s result on the right; notice how Google’s solution has less ringing artifacts in both examples.

The JPEG encoder is open-source and available for you to download and implement in your own projects from this GitHub repository.

Announcing Guetzli: A New Open Source JPEG Encoder on Google Research Blog

Read next: Master Adobe Photoshop, Illustrator and Premiere Pro in one $29 bundle