Hi Gabrielu, I was going to add, you can always do something on the client for *one off *images. For example, here is a javascript function using jQuery to fetch user object. Keep in mind, rate limits are 150, so if you expect your visitors to go way over that, then this is a bad way to go, but if you happen to have something where they are going to look at a handful of image, this can be useful.
function fetchUserProfile(userName) { $.ajax({ url: "http://api.twitter.com/1/users/show/ "+profileName+".json?cursor=-1&callback=?", cache: false, success: function(data) { // this variable below will container the URL to the twitter avatar var profile_image_url = data.profile_image_url; } }); } On Mon, Oct 11, 2010 at 4:02 PM, Taylor Singletary < taylorsinglet...@twitter.com> wrote: > My recommendations: > > If you just have a member id or screen name and want only the current > profile image, use GET /users/profile_image to get the current URL as the > return, then cache that value and use it as your image src. > > If you are interested in more information about the user than just the > profile photo, and you're starting with a member id or screen name, use bulk > user lookup: GET users/lookup or GET users/show for the user in question. > > If you are simply rendering tweets and want to render an avatar next to the > tweet, just use the profile image that's embedded in the user object for the > tweet you're rendering. It's "right" more often than not. > > It comes down to context: what data you're starting with and what you're > wanting to do with it. > > Taylor > > On Mon, Oct 11, 2010 at 3:57 PM, gabrielu <gabri...@gmail.com> wrote: > >> So what's the right way to get user profile image? >> >> On Sep 30, 10:30 am, Tom van der Woerdt <i...@tvdw.eu> wrote: >> > Every image you load using this method counts as 1 API request. So, yes, >> > that's bad. >> > >> > Tom >> > >> > On 9/30/10 11:48 AM, Jayawi Perera wrote: >> > >> > >> > >> > >> > >> > >> > >> > > Hi all, >> > >> > > I have a page in which there is a listing of past tweets. In this >> > > page, I want to display the author's profile image next to the tweet. >> > > I've come across the following: >> > >http://dev.twitter.com/doc/get/users/profile_image/:screen_name >> > >> > > My question is, is it wrong to use this as the src within an img tag? >> > > I raise the above question because of the following mentioned on that >> > > page: >> > > "This method should only be used by application developers to lookup >> > > or check the profile image URL for a user. This method must not be >> > > used as the image source URL presented to users of your application." >> > >> > > Thank you for your help. >> > >> > > Cheers, >> > > Jayawi~ >> >> -- >> Twitter developer documentation and resources: http://dev.twitter.com/doc >> API updates via Twitter: http://twitter.com/twitterapi >> Issues/Enhancements Tracker: >> http://code.google.com/p/twitter-api/issues/list >> Change your membership to this group: >> http://groups.google.com/group/twitter-development-talk >> > > -- > Twitter developer documentation and resources: http://dev.twitter.com/doc > API updates via Twitter: http://twitter.com/twitterapi > Issues/Enhancements Tracker: > http://code.google.com/p/twitter-api/issues/list > Change your membership to this group: > http://groups.google.com/group/twitter-development-talk > -- Peter Denton Co-Founder, Product Marketing www.mombo.com cell: (206) 427-3866 twitter @Mombo_movies twitter - personal: @petermdenton -- Twitter developer documentation and resources: http://dev.twitter.com/doc API updates via Twitter: http://twitter.com/twitterapi Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list Change your membership to this group: http://groups.google.com/group/twitter-development-talk