Ben of frogstr had recently posted on how gravatar can help your brand. It is indeed nice service (I am going to explain in details below) but taking in account people that simply hadn’t bothered to setup gravatar yet there is one awesome way to fix no-avatars problem on your blog.
That is pulling hash generated avatars from gravatar service.
I had posted on some hash tricks in the past. Repeating basic idea – hashing is getting long weird looking string of characters from some input. In case of gravatar input for hash is email address you fill in when making comments on blogs. Hash allows to use your email for gravatar service without exposing it – it is not possible to calculate email from hash.
Gravatar is online service owned by Automattic (developers of WordPress) that serves avatar images responding to specially formed URLs with MD5 hash in them.
- Register on gravatar site with your email and upload image for avatar.
- Every gravatar-enabled blog will start showing that image near your comments.
Cool, isn’t it? Problem is for every person with gravatar there are hundreds without one. So comment discussions still look faceless with occasional gravatar splashes.
I said above that gravatar request is made with URL. So to see it I need hash email. I can either get it from gravatar image properties (right-clicking image in browser is usual way to get there) or go to online MD5 generator and calculate it.
Hash for my personal email is f2b6e0c8a09d8faadb50d56890e2528c. When I comment request is made to the following link: http://www.gravatar.com/avatar/f2b6e0c8a09d8faadb50d56890e2528c.jpg
And my gravatar is downloaded and pasted in page.
But what if I have no gravatar?
My contact email for this blog is firstname.lastname@example.org. Its hash is ab89ce39f47b327f1c85e4019e865a71. And link: http://www.gravatar.com/avatar/ab89ce39f47b327f1c85e4019e865a71.jpg
gets ugly placeholder image:
Here come hash generated avatars!
Adding some parameters to URL makes gravatar send not an boring image but one generated from hash. So different hashes get different images, but as long as same email is used and same hash is calculated – same image is going to show for it.
How to use them
Go to Settings > Discussion in WordPress admin area. It has setting that allows to choose what to show instead of placeholder image.
Gravatars complemented by hash generated versions are very nice visual clue for comments in blog. It allows to easily spot active commentators or acquaintances even across different blogs.
MonsterID and Wavatar are bit too… Weird. :) I went with Identicon for this blog. So if you don’t have gravatar yet – comment below this post and check out cool geometrical pattern it assigns to you.