Using gravatar to display icons
An avatar is somewhat like a symbolic identification of your online presence like companies having their own logos in the real life.
In forums it is normal to have your very own user profile with a nick name altering to the real name. You may attach a photo or some other graphics which will be shown on every of your posts. Because those tiny little icons are easier to recognize than any texts, it helps you quickly to identify a poster without first reading the username.
Even the comments in a blog do containt the icon and the name of the poster below. Why not having icons there, too?
The website gravatar.com provides a great and simple solution for this issue called “globally recognized avatars“. You just sign up with your email address. Then you add a picture to it. It also offers you the possibility to rate your avatar, so that you have different versions for the same account, like adult and non-adult.
To display those pictures, you can use gravatar.com‘s free API. You can use the HTML’s image source tag to the gravatar.com and give just three arguments. The first one is a MD5 hash of the email address, the second one is the rating and the thirst and last one is the image size.
Some blog systems like WordPress are using this. It works so well, because to register a forum or to leave a comment, you will need a valid email address. And exactly this is used to identify your icon picture.
To add some security against spammers, the MD5 hashkey of the email address instead of the plain text is used.