Called Guetzli, which is apparently Swiss German for cookie, the new JPEG encoder does its magic during the so-called quantization stage of image compression, which is when the encoder tries to strike a balance between removing detail to keep size down, without obliterating the source image.
Guetzli uses what Google’s calling a “psychovisual model” to reduce file size, which approximates color perception and “visual masking” more thoroughly than other encoders. This, however, comes at a cost, and in this case that’s time, as Guetzli is decidedly slower than other image compression methods out there.
Check out these examples to get a better idea of how Guetzli works:
A crop of an image of a phone line hanging against a blue sky. From left to right – original image, libjpeg compression in the middle, and Guetzli on the right
As you can see, the new encoder fares better than libjpeg, although, as we said above, it needs more time to produce results.
Here is another example: