Using Gravatars On Your Blog – Why And How

Blogs are simply awesome for building a community. There is innate two-way communication to you posting something and others offering their two cents by way of comments. That sense of community, though, is enhanced when you can SEE them.

Gravatars are “globally recognized avatars”. It is a little photo which represents the user which can be used across the Internet to represent that person. Gravatars are very common on blogs.

How To Get a Gravatar

If you do not have your own gravatar, go get one. You can do that at the official Gravatar website. It works based on your email address. So, essentially, you upload a photo and it is associated with your email. Wherever you have a profile that uses the same email address, that photo can be used to represent you.

Why Should You Use a Gravatar?

My recommendation is that you now only have gravatars display on your blog, but that you ensure you have your own.

From a branding perspective, having an avatar which is consistent across the web as representing you enhances your brand. Wherever people see that, they will associated it with you and your brand. I like to use a photo of myself. A picture says a thousand words, as they say, and I think people being able to see what you look like makes for a stronger connection than just an anonymous name.

If you are trying to build up a business brand, I recommend you use a logo of some sort for your gravatar. If you are trying to build your personal brand, you might want to use a photo.

From the blogger perspective, using gravatars enhances the sense of community. It turns comments into statement by real people. It enhances the sense of real community at the blog.

Integrating Gravatars on Your Blog

Gravatars haven’t always been trouble-free for bloggers. For a time, it was unreliable and bloggers would tend to remove them because the images wouldn’t even load properly. Then Automattic bought it (the same folks behind WordPress) and they provided the necessary hardware support to make it dependable.

The fact that Automattic now owns it, though, means that WordPress has gravatar support built-in. You simply need to enable it.

If you enable it and they do not appear, then it is likely because you are using a customized comment template for your theme that simply doesn’t include gravatar support. However, it is simple to add it. In your comments.php them file, just add the following template tag whereever you want the gravatar to appear:

<?php
echo get_avatar( $id_or_email, $size = ’96′, $default = ‘<path_to_url>’ );
?>

How do you use this in practice if you’re not a PHP nerd? Well, if you look at your comments.php file, you will probably see what is called a FOREACH loop. It will probably look like this:

<?php foreach ($comments as $comment) : ?>

Everything under that and up to the endforeach comment gets repeated. This is what shows all the comments on your blog post. So, inside that loop, add the following command:

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

This will feed the $comment variable into the get_avatar() function and you’re telling it to output 32×32 avatar images. You can change that number if you want large images. In your WordPress control panel, you can dictate what the default image will be if the user doesn’t have a gravatar.

You will need to place HTML around this little line of code to make the gravatar merge with your site’s design.

So, that’s how you do it.

Do you use gravatars on your site?

Blog Transformation Challenge

Like what you read?

... then take the next step. Register for the 30 Day Blog Transformation Challenge. TRANSFORM your blog by perfecting your writing, optimizing your design, and learning how to optimize the marketing funnel.
Click to Learn More ... or...

You Might Also Be Interested In...

  • http://www.acreageanywhere.com/lots_and_acreage/ Johnny ‘Acreage’ Benoit

    Just getting into your blog and noticing that all your posts are so thorough. It’s great to receive a new idea from someone/somewhere, and then get all the relevant details about that idea in the same place! Thanks.

  • http://www.acreageanywhere.com/lots_and_acreage/ Johnny ‘Acreage’ Benoit

    Just getting into your blog and noticing that all your posts are so thorough. It’s great to receive a new idea from someone/somewhere, and then get all the relevant details about that idea in the same place! Thanks.

  • http://www.mikeslife.org Mike CJ

    Thanks for this David – not something I knew about, but hopefully when I hit submit, I’ll see my new gravatar!
    For other Drupal users, there is a Drupal gravatar module available, so I have also now enabled them on my sites.

  • http://www.mikeslife.org Mike

    Thanks for this David – not something I knew about, but hopefully when I hit submit, I’ll see my new gravatar!
    For other Drupal users, there is a Drupal gravatar module available, so I have also now enabled them on my sites.

  • http://www.mikeslife.org Mike CJ

    It worked! I am officially now a geek – and it’s all thanks to David Risley!

  • http://www.mikeslife.org Mike

    It worked! I am officially now a geek – and it’s all thanks to David Risley!

  • http://www.mattybyloos.com/ Matty Byloos

    I personally love the idea as blogging as community building. Ever thought of doing a massive post on this with links to all the former posts (like this one) that also have dealt with community?

  • http://www.mattybyloos.com Matty Byloos

    I personally love the idea as blogging as community building. Ever thought of doing a massive post on this with links to all the former posts (like this one) that also have dealt with community?

  • http://thoughtsunlimited.net/ Ashwin

    Very useful post. I am bookmarking it and sharing it on Twitter!!

    http://twitter.com/thotsunlimited

  • http://thoughtsunlimited.net Ashwin

    Very useful post. I am bookmarking it and sharing it on Twitter!!

    http://twitter.com/thotsunlimited

  • http://www.stuartconover.com/ Stuart Conover

    I have to fully agree with the view of using a company logo or image of yourself. I’d like to add in that I believe if you are going to use an image of yourself you may wish to use the same one that you have set on social networking sites, forums, etc.

    A “main” image of yourself that is which can be help associate everything by you together.

  • http://www.stuartconover.com Stuart Conover

    I have to fully agree with the view of using a company logo or image of yourself. I’d like to add in that I believe if you are going to use an image of yourself you may wish to use the same one that you have set on social networking sites, forums, etc.

    A “main” image of yourself that is which can be help associate everything by you together.

  • http://www.websitesinaflash.com/ Ashton Sanders

    Excellent! I was just thinking about this! Thank you!

    btw, you’re single quotes ’ are the Microsoft Word quotes, and don’t work. You can remove the quotes around the 96, too.

    Thanks again,
    Ashton Sanders

  • http://www.websitesinaflash.com Ashton Sanders

    Excellent! I was just thinking about this! Thank you!

    btw, you’re single quotes ’ are the Microsoft Word quotes, and don’t work. You can remove the quotes around the 96, too.

    Thanks again,
    Ashton Sanders

  • Pingback: Digital Biographer™ » Posts about Personal Branding as of March 3, 2009

  • Pingback: Friday 5 - Top 5 Blog Posts Of Week Ending On 03/06/09 | Stuart Conover

  • http://www.chrislangston.com/ Chris

    David,

    It’s refreshing to see someone explain the benefits and ease of setup of the Gravatars as you have done in this post. It was a snap for me to setup and I look forward to now using my Gravatar across the net.

    Chris

  • http://www.chrislangston.com Chris

    David,

    It’s refreshing to see someone explain the benefits and ease of setup of the Gravatars as you have done in this post. It was a snap for me to setup and I look forward to now using my Gravatar across the net.

    Chris

  • http://www.farrfeed.com/ John H. Farr

    I find it very reassuring to be able to put a face to names. Unfortunately, one can’t see much of mine in this one, so I may whip up another!

  • http://www.farrfeed.com/ John H. Farr

    I find it very reassuring to be able to put a face to names. Unfortunately, one can’t see much of mine in this one, so I may whip up another!

  • Marlene

    Just adding my thanks, David. I wondered how people got their pics to show up when they made comments on blogs.

  • Marlene

    Just adding my thanks, David. I wondered how people got their pics to show up when they made comments on blogs.

  • http://www.mackintoshconsultants.co.uk/ Nigel Mackintosh

    Thanks for the help with this topic. I’m new to blogging, and Gravatars now make sense!

  • http://www.mackintoshconsultants.co.uk Nigel Mackintosh

    Thanks for the help with this topic. I’m new to blogging, and Gravatars now make sense!

  • Pingback: Make Your Picture Show Up Next to Your Comments | HighCallingBlogs.com

  • genecoleman

    I have read a few times, in passing, about the importance of a gravatar. wihout a real explanation of why, I never did anything about it. With your explanation, I now have the real incentive. It helps to know why and how.

  • http://www.crazybusyentrepreneur.com/blog Jen Furrier

    Thanks for the info, David. Just got my Gravatar all set up – thanks!

  • http://www.crazybusyentrepreneur.com/blog Jen Furrier

    Thanks for the info, David. Just got my Gravatar all set up – thanks!

  • rashmi23w

    Will definitely get mine now :D

  • http://professional-suggestion.com/ Uninstall Program

    Gravatar cn make visiters remember your site:)

  • http://www.sandalsbay.com/ chanel shoes

    You can show your own style and have a good time every day so easily.