How to get the original image?


#1

I’m using the Twitter Streaming API for retrieving status with photos which has a specific mention.
The API provides me 4 image resolutions. (https://dev.twitter.com/docs/tweet-entities)

The question is:
Can I get the original photo uploaded by the user (through Streaming API or another way)?


#2

Only the sizes mentioned in that document are available .


#3

Thank for your answer.

In my case, I want the most similar photo to the original photo uploaded by the user, so I’m trying to use the “large” resolution provided by the API.

I’ve done some internal tests with different image resolutions, see the results below:
ORIG. SIZE - TWITTER RESIZE

  • 4000x3000 = 1024x768
  • 6000x6000 = 1024x1024
  • 2000x4000 = 1024x2048
  • 1024x2049 = 1023x2048
  • 1025x2048 = 1024x2046
  • 6000x1000 = 1020x170
  • 1000x6000 = 341 x 2048
  • 1024x2048 = 1024x2048
  • 1023x2047 = 1023x2047

I noticed that there are some possible “rules”:

  • For resolutions less than 1024x2048, the retrieved photo was the same of upload before.
  • For resolutions more than 1024x2048, the retrieved photo was resized to fit in this limit.

Could you confirm the rules that Twitter applies to resize a photo? Or you have some documentation about that I can check it.