#Url twitter download upgrade#
Upgrade to WP Tweets Pro for extra features, including:
#Url twitter download how to#
I found this documented – after the fact – in the v1 data model: Entities object | Docs | Twitter Developer Platform, which does explain how to rewrite URLs in this fashion, but doesn’t provide the full list of supported sizes (as seen above, at least 900x900 and orig are unlisted). Which makes perfect sense – there’s no reason to expect a company to store images with arbitrarily large dimensions and serve them to all and sundry, especially when most of the requests will be for downscaled versions anyway. This use is deprecated, but still works as of this writing.īut the end result is that, if the original posted image had any dimension greater than 4096, that size can’t be retrieved the ‘orig’ is limited to the version resized to fit within 4096x4096. returns an image with dimensions no larger than 2048x2048.
You can also retrieve these by appending the alias (but not the dimensions) to the URL with a colon: Thumb 150x150 (This one is cropped to a square) There are some short aliases for different sizes:
(These scale down, but not up if the original image was 640圆40, it won’t be any larger with any changes.) Let’s take the post 1445101025212444673 (a recent image post by When you query it with media.fields=url,height,width you get:Īnd getting that URL returns an image with height=632 and width=1200.īut from the web interface, the urls used to display the image are built as a GET query: The web Twitter interface rewrites the url in a few different manners. When retrieving images from, the unmodified URL returns an image limited to 1200x1200 pixels. With some further experimentation and searching, I’ve found that you can retrieve images in their original dimensions, up to a point, but only by rewriting the returned URL. Is this an error? If this is the intended behavior, is there a way to get the original – or at least, full-scale – image through the APIs? I did a quick check to see if this was peculiar to API 2 a quick test showed that this also holds true for API 1.1, at least via the URL. (As an example, the particular tweet/image pair I last tried is 2146x3578, and the retrieved image is 720x1200.)
#Url twitter download download#
The problem is that – at least for a sufficiently large image – when I download the provided URL, it’s a scaled-down version of the original, even though the returned height and width fields are those of the original. This returns the appropriate JSON data for an attached JPEG, it includes the media fields type, width, height, media_key, and url. I’m attempting to use the API 2 tweets endpoint to retrieve the image attached to a particular tweet.