How to get user image original size with API 1.1


In 1.0, I could retrieve the image via GET users/profile_image/:screen_name. I don’t see a 1.1 equivalent. Help?


Would love to know the answer to this query as well. Running into this myself and wondering if the 1.0 way of grabbing a user’s profile image (bigger/normal/etc.) will stop working once 1.1 is out and 1.0 is bye-bye.


See [node:10796] for information on determining different sizes for Twitter avatars in 1.1 (and v1 for that matter).


Just what I needed, thanks.


Thank you for your post…really helped to to me


Thanks for


Is there a way to get it without making a whole new request, like Facebook and Google+:{facebook_id}/picture{google_id}


twitter bad method…


Thanks TS… :slight_smile:


@jwerre - Hey man, in order to get the original image, take the address they give you from the API call, eg. statuses[0].user.profile_image_url, and strip off the “_normal” from the file name. In other words,

take this:

and make it this:

and that’s the full sized image. Hope that helps!


Thank you very much


in php code bad but funcional xD!, you can replace $size for bigger , mini etc :smiley: or echo str_replace(’_normal’, ‘_bigger’,$tweet->user->profile_image_url)


@pete_klein & @JosueOrtizFdz good trick…!!! Thank YOu…!!!


In API v1.1, the Twitter docs now tell you to “modify the URL” rather than make another request to get the URL for a different image size. So basically, like @pete_klein said, take the profile_image_url from a previous API call (like get friends) and do a string replacement for “normal” to “bigger” or “normal” to “” to get larger profile images.

It feels a little sneaky, but so long as the conventions don’t change it’s one less API call for Twitter’s servers to respond to, and one less API call for your client to make.


Thnq Very very much


str_replace(’**_**normal’, ‘’, $tweet->user->profile_image_url)


Worth noting that you can also just use[screen_name]/profile_image?size=original. For instance,


Is that an officially supported endpoint? I can’t seem to find it in the docs.


It’s not in the docs because it’s not part of the API. It’s a supported part of the site, though.



Thanks for the confirmation. Found a bug, described here since it’s not part of the REST api.