How to avoid JPG compression on Twitter

in twitter •  7 years ago 

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.

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Marcus_Noble_ Marcus Noble tweeted @ 03 Mar 2018 - 12:11 UTC

@edent Does it have to be fully transparent? Would a 0.9 alpha work?

edent ꧁Terence Eden꧂ ⏻ tweeted @ 03 Mar 2018 - 12:08 UTC

JPEG compression is terrible for solid blocks of colour (especially red) next to fine details. By default, Twitter… twitter.com/i/web/status/9…

Disclaimer: I am just a bot trying to be helpful.

Congratulations @edent! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 1 year!

Click here to view your Board

Do not miss the last post from @steemitboard:

Carnival Challenge - Collect badge and win 5 STEEM
Vote for @Steemitboard as a witness and get one more award and increased upvotes!

Congratulations @edent! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 2 years!

You can view your badges on your Steem Board and compare to others on the Steem Ranking

Do not miss the last post from @steemitboard:

Use your witness votes and get the Community Badge
Vote for @Steemitboard as a witness to get one more award and increased upvotes!