What is your Gravatar?

gravatar.jpg “Putting a face to the blog, literally”. That was my first impression when I first came across gravatar recently.

What it is all about:
“A gravatar, or globally recognized avatar, is quite simply an 80×80 pixel avatar image that follows you from weblog to weblog appearing beside your name when you comment on gravatar enabled sites.”

The 2 value propositions of gravatars
1. personalize your email with additional image
2. image can be filtered according to rating

The idea is not unique (X-Face has been around since 80s but not many email clients support the proposed method). However, by banking on the need to personalize, it is able to a build up a fantastic adoption rate in a short span of 1 year especially in the era of exploding blogosphere. This is a classic example of having the right product, at the right place, on the right time. And it shows how powerful viral marketing effect can have on the success of a product.

Setting up the plugin

1. register and upload your gravatar at www.gravatar.com (wait 2-3 days for your gravatar to be approved and rated)

2. download plugin for wordpress here. Have a look at their support to various blogging tools if you are not using WordPress.

3. Upload the file to the WordPress plugin folder.

4. Now we are ready to inject the plugin into our theme. Go to your wordpress theme folder and look for the code where comment is to appear (normally in comments.php). Insert this code where you want the image to appear. I’ve placed mine above the commentor’s name.
<?php gravatar(); ?>

5. Activate the plugin through admin panel and you are done. Now for each comment the plugin will display the visitor’s gravatar.
visitor.jpg

When a commentor do not have an associated gravatar, the plugin will display default small white square, which can break the design of blog layout. What you can do is to designate a default no gravatar image.

6. Create a default image and upload to the server. Here’s how mine looks like.
no_gravatar.jpg

7. I’ve placed the default image in my theme/images folder. Going back to step 4, now we simply tell the plugin to use this image if it cannot find an associated gravatar
<?php if (function_exists('gravatar')) { ?>
<img src="<?php gravatar("X", 40, get_bloginfo(’stylesheet_directory’) . "/images/no_gravatar.jpg" ); ?>" class="gravatar" alt="Gravatar" />
<? } ?>

Head over to Using Gravatars at Wordpress for details explanation of various plugin options.

I anticipate Gravatar facing some uphill challenge in near term as developers are warming up to the idea of avatar. Wordpress.com recently introduced avatar feature. And if Technorati (which indexes almost every blog on the planet and already allows bloggers to attach a photo) decides to offer similar functionality, can Gravatar hold its fort?


About this entry