Coming soon: improved image sizes to the API

By
Tuesday, 5 April 2016

We’re constantly iterating on our systems for better performance and quality. Recently, we’ve been improving the way uploaded images are scaled before they’re displayed on Twitter. Starting June 1, you’ll see a subtle change that increases some of the image dimensions returned in our APIs.

Please note that older versions of Twitter Kit for iOS do not properly support this change, and to avoid a regression in image quality you will need to update.

Previously, we’ve resized images along their width, such that portrait images can be returned at a higher resolution than landscape (i.e., the “small” size was always resized to a width of 340px). To return images of consistently high quality at any aspect ratio, we’ll now resize images along their shortest edge. As a result the same “small” landscape image may now be 340px high, and wider than in the previous response.  The table and graphic below visually demonstrate how the small landscape image size has changed. 

Coming soon: improved image sizes to the API

Coming soon: improved image sizes to the API

Visual comparison of the old and new “small” size for landscape images

A live reference for the minimum dimension for each size — “thumb”, “small”, “medium”, and “large” — can be found (and consumed by your application) in the help/configuration API endpoint.

Make sure that your applications are prepared to render the larger images. Be especially careful with code that inspects image width; there can now be a much larger step between sizes, especially the 150px square “thumb” and the “small” images.

On iOS, older versions of Twitter Kit do not properly support this change, and to avoid a regression in image quality you will need to update to Twitter Kit v2.0 or Twitter Kit v1.5.3 before June 1. Twitter Kit for Android already fully supports the new images. Of course, by keeping up-to-date you’ll also be able to take advantage of newer features like video playback, Tweet detail views and a refined programming interface.

Images will continue to render in the older Twitter Kit for iOS releases, but some landscape images may display at a lower resolution after our API change takes effect. Please update today! Check out the documentation, and let us know in the forum if you have any questions regarding this change.

Update Jun 3, 2016: This change is now in effect and the Twitter API is returning larger images. Twitter Kit for iOS users should now be using v1.15.3 or newer to avoid a regression in image quality. Please use the forum should you have further questions.