Alternative to GET users/profile_image in API v1.1?


API v1 included a GET users/profile_image method for retrieving a link to a user’s profile image.
Is there an alternative in API v1.1?



users/show will contain this, as will account/verify_credentials if you’ll just be doing it for the current authenticated user.


I was hoping for something that can be used as a SRC attribute, but they seem to have removed this functionality on purpose. Found this reply at the “Discussion around Planning API v1’s Retirement” discussion:

There is no direct way to use API v1.1 for just profile images – API v1’s feature that provided this was often used in unintended ways counter to the documentation, as the SRC attribute in IMG tags. You’ll need to make authenticated requests to canonical sources of user information (users/show or users/lookup) to retrieve the most recent profile image URL, then use the instructions in User Profile Images and Banners to derive the version you’re looking for.


Yeah it would never have been a good idea to use it like that really anyway, especially considering it’s rate limited. Using the URL from the user object or even storing the image on your server and serving it yourself would always have been a better solution.