The Journal Of A Linux Sysadmin

Enabling Gravatars

| Comments

“Gravatars are Globally Recognized Avatars. An avatar or gravatar is an icon, or representation, of a user in a shared virtual reality, such as a forum, chat, website, or any other form of online community in which the user(s) wish to have something to distinguish themselves from other users.”

I’ve just finished enabling gravatars on my blog, and this was as simple as adding the gravatar code in my theme. Starting with Wordpress 2.5 gravatars are enabled by default without any additional plugin needed, and you only need a compatible theme to start using gravatars. This was not the case with my theme so I had to add a simple code to enable this:

<?php echo get_avatar( $comment, $size = '32' ); ?>

There are other parameters you can use, and they can be found here:

This means that any commenter that has a gravatar (you just have to register your email address and upload your image) will have it displayed on my blog also. Finally ;-).

ps. I tried out also the WP-Gravatar plugin that works with more services (Gravatar, MyBlogLog, OpenAvatar, Wavatar, Identicon, monsterID or Favico.ico), but I am not really sure if this is really needed. For now I will settle with gravatars only, but maybe in the future I will enable the wp-gravatar plugin and disable the default wp function.