Terence Eden avatar

How to avoid JPG compression on Twitter

edent

Published: 03 Mar 2018 › Updated: 03 Mar 2018How to avoid JPG compression on Twitter

How to avoid JPG compression on Twitter

Let's talk image compression! Services like Twitter will often apply aggressive levels of compression in order to reduce their storage space and decrease download times. This can have negative consequences for usability and image quality.

Here's an example - this detail of a logo from my former employers, Vodafone. Solid red - with some fine detail in white:

The Vodafone logo with the text "The future is exciting. Ready?"

If you upload it to Twitter, it will automatically be compressed to a low quality JPG. And this is what it looks like...

The logo has been compressed. It looks disfigured.

Yuck! Look at the grimy artefacts surrounding the text! By default, the image quality that most websites choose is 85%. That's not sufficient for images like this.

How To Fix It

PNGs have an interesting property that JPG images don't - they can be transparent. When Twitter sees even a single transparent pixel, it refuses to convert the original image and keeps it as a PNG.

Using GIMP - or any other photo editing tool - you can crop out a pixel from the image:
Screenshot of a graphics editor. One pixel has been removed from the image.

You can see a demonstration at

If you can't bear to have a "missing" pixel - you can set a single pixel's opacity to 90%. That will also prevent compression.

Does this only work on Twitter?

Sadly, yes.

LinkedIn displays an 85% quality JPG in the preview.
Screenshot of the LinkedIn page
They will let you see the original PNG once you click through.

In my experiments, Facebook compressed the transparent PNG to a 71% quality JPG.
A heavily compressed image
That looks nasty! There appears to be no way to download the original.

ReDeCentralise

One of the advantages of hosting your own content is that you - the user - get to choose what is an appropriate trade-off between quality and filesize.

Leave How to avoid JPG compression on Twitter to:

Written by

Crypto is a load of bollocks.

Read more #twitter posts


Best Posts From Terence Eden

We have not curated any of edent's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.

More Posts From Terence Eden