I wonder if most of this functionality can be hoisted out into a common baseclass.  Something similar is needed for avatar thumbnails too, and possibly also for Twitter profiles or Google avatars.