Problem

Twitter has an amazing API and a great developer ecosystem, but there is one pain point: avatars are transient. The profile_image_url attribute in the /users/show endpoint is a direct link to an S3 URL that includes the original file name. This is a problem for a number of reasons.

Many developers have turned to maintaining their own solutions, which is a pain. Other developers might like to use Twitter usernames similar to the way email addresses can be used with Gravatar. SOMETHING MUST BE DONE! THINK OF THE CHILDREN!

Solution

Replace your <img src="http://a3.twimg.com/profile_images/71412989/Picture_4_bigger.png" alt="aplusk" /> with tweetimag.es URL's and we take care of showing the proper icon.

For example, to show joestump's Twitter profile icon you would simply do <img src="http://img.tweetimag.es/i/joestump_n" alt="joestump" /> in your application's HTML source.

Format: http://img.tweetimag.es/i/{username}_{size}
m (24x24) n (48x48) b (73x73) o (original size, varies)
joestump joestump joestump joestump

That's it?

That's it.


Who do I blame for this?!

The PHP was hacked together by Joe Stump, the servers were wrangled by the eminent Chris Lea, the hosting is graciously provided by Media Temple, and the design was whipped together by Joshua Strebel. This service is provided as-is and is not warranted by anyone, anywhere, regardless of what you may think.