How to avoid JPG compression on Twitter

@edent · 2018-03-03 12:37 · 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 https://twitter.com/edent/status/969907247026442240

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.

#twitter #images #photo #compsci #internet
Payout: 0.000 HBD
Votes: 2
More interactions (upvote, reblog, reply) coming soon.