1. Photo & Video
  2. Post-Processing

Twitter JPEG Compression: How to Create the Best Quality Image for Your Feed

Scroll to top
Read Time: 4 min
This post is part of a series called Image Compression for Photographers.
Facebook JPEG Compression: How to Get the Best Image Quality on Your Timeline

For pictures on your feed, Twitter don’t appear to restrict us nearly as much as Facebook does, so posting a decent quality picture to a feed should be relatively easy, right? Well, it's trickier than you might think. This Quick Tip aims to get your JPEGs displayed in the best way possible.

Twitter Feed Pictures

Twitter has given us these guidelines:

twitter guidelinestwitter guidelinestwitter guidelines
Twitter's Guidelines

We’re focusing on JPEG in this Quick Tip so all examples are in that format. It would seem that with a 5MB limit we already have a lot more to play with than Facebook. But is that necessarily the case? A 5MB file might be compressed by Twitter down to the same as a 3MB or a 1MB file with varying states of distortion. So let’s find out!

example pictureexample pictureexample picture
Our example picture

I uploaded three versions of my above example to my Twitter Feed; a 3000px (4.2MB) file, a 2000px (2.2MB) file and a 1000px (734kb) file. This is how they came out:

pictures after twitter compressionpictures after twitter compressionpictures after twitter compression
Pictures after Twitter Compression

I saved each image which had been auto-resized to 600px by Twitter (you can only save the preview but I could screen capture the full-view version which you see above) and noticed that the file sizes were very interesting. 

The 3000px 4.2MB image had come out at 47.2kb, the 2000px 2.2MB at 47.5kb and the 1000px 734kb at 52.4kb.  So the larger of the images had actually gone down to the smallest size. Interesting when you look at the compression on each. The largest image has some compression artefacts but it’s also lost a lot of its sharpness across the whole image. The smallest is now the largest file size, but the compression is very pronounced around the outlines of the people. 

As in the case of Facebook, it seems that larger images fair better; but not too large. In my own experience, somewhere around 1500-2000px is about right and if you can lower the file size with Adobe Photoshop's Save For Web option then all the better.

Header Photos

This is my example:

test headertest headertest header
Example header

Upload of a High Resolution Image

Firstly I tried this at very high resolution, 5000px wide and 8MB – the max Twitter will allow is 10MB.

large resolution twitter headerlarge resolution twitter headerlarge resolution twitter header
Large resolution Twitter header

That looked pretty good to me. It’s cropped in a little but as it was a hi-res image, that’s okay. You can see there’s very little visible compression here.

I was pretty smug, until I hit save:

after savingafter savingafter saving
The compression after saving was pretty bad

The compression happened after saving the good looking image. You can now see compression around the edges and an overall loss of sharpness

So what if we upload the same thing but after resizing to Twitter’s recommended 1500 x 500px?

Upload of Twitter's Recommended Size Image

Recommended size for twitter headerRecommended size for twitter headerRecommended size for twitter header
Twitter's recommended header size

It’s cropped in like the other did but the compression is nowhere near as bad. Here are the comparisons side by side:

comparisons at 100comparisons at 100comparisons at 100
Comparisons of a large size and Twitter's recommended size at 100%

You can see the loss of definition in both but the one on the left is far worse, with quite visible distortion, especially around the writing on the boat.

What If...

Twitter's guide's clearly worked better than a full size image but I wondered; what if I took their size, kept the same ratio but doubled the size. I created a 3000px by 1000px image and tried that:

Twitter header ratio doubledTwitter header ratio doubledTwitter header ratio doubled
I tried doubling Twitter's recommendation, 3000 x 1500px

Aha! This looks much better to me; there are still signs of compression but you can see from the 100% preview in the corner, the writing on the boat is much clearer and the edges of objects have far less visible artefacting.

Summary

Third party websites are always going to compress our images, we just have to find the best way possible of displaying them with these restrictions. Their guidelines are there for a reason but that's not to say having a play around won't get you better results.

Getting the best results for feed images

  • Upload a large(ish) size, ideally between 1500px-2000px
  • Save at maximum quality possible
  • Reduce the file size with Save For Web

Getting the best results for cover images.

  • 3000px by 1000px worked well for me
  • It must be under 10MB 
  • It will crop in but the results will be far better than resizing to the recommended 1500px by 500px

See Also

Facebook also compresses your images. Yesterday we looked at how to get the best results for your timeline.

Advertisement
Did you find this post useful?
Want a weekly email summary?
Subscribe below and we’ll send you a weekly email summary of all new Photo & Video tutorials. Never miss out on learning about the next big thing.
Looking for something to help kick start your next project?
Envato Market has a range of items for sale to help get you started.