Using 'Guetzli', Twitter Compresses JPEG Images Without Necessary Loss Of Quality

Twitter Guetzli

Twitter is a social media where people rapid-fire their thoughts, express their opinions and share their views on whatever topic imaginable.

In a place where tweetstorm happens, people expect loading speed, and here, fast is a must. For this particular reason among others, Twitter compresses photos and videos by much to preserve bandwidth and make people's feed to load as fast as possible.

But here is the drawback: quality.

Each and at every compression level, the transcoding can degrade the quality of images uploaded to Twitter.

This is why Twitter is trying to change that, by preserving the quality of JPEG files, as Nolan O’Brien, a software engineer working at Twitter, has revealed:

To make this happen, Twitter starts using what it is called 'Guetzli'.

The freely licensed JPEG encoder originally developed at Google Research Europe in Zürich, Switzerland by Jyrki Alakujala, Robert Obryk, and Zoltán Szabadka, can compress JPEG files significantly than other encoders, but by retaining an almost equivalent quality.

The downside of Twitter in using Guetzli is that, the compression method requires huge amount of resources, and quite slow to compress.

What's more, Guetzli only supports JPEG at its top quality range, and supports only sequential (non-"progressive") encoding.

The method has previously been used by the likes of Google to cut down web page loading times.

For Twitter users, there are some that should be noted.

First, Twitter still compresses thumbnails of images, which are the images users see in their Twitter feed. But once users click through the images, they will get the full, uncompressed (at least, not additionally compressed) images originally uploaded, provided it’s a JPEG.

Second, there are some conditions that should be followed for the compression to happen on Twitter:

  1. The resolution of the JPEG file shouldn’t be more than 4096 pixels on any side.
  2. The size of the image shouldn't be larger than 5MB.
  3. The orientation shouldn’t be set to rotate the image (EXIF orientation).

On the bottom line, Guetzli on Twitter should make the platform faster when loading JPEG images. In general, this should appeal most Twitter users.

According to O’Brien, Twitter is looking forward to use Guetzli for avatars, too.

Published: 
13/12/2019