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.