If you’ve been with WordPress awhile, you’ll probably remember back in October of 2007 when Automattic purchased Gravatar.   The concept behind Gravatar had always been an incredible idea, but it had always lacked the time and resources needed to make it work.  Now that Automattic acquired Gravatar, it was pretty obvious that the service would be resurrected and would be a great fit for the WordPress platform.

Earlier this year when WordPress 2.5 came out, a shift was made in the WordPress community from the widely popular MyAvatars plugin (which uses MyBlogLog avatars) to Gravatars.   In addition to being built into WordPress.com blogs, we were also given the ability to build Gravatars into your WordPress.org blog.  But, did you know that WordPress.org blog owners can now also create your own custom default Gravatar image?

Over at Pro Blog Design, Michael has written a great tutorial explaining exactly how to add your own default Gravatar image, as well as provide some tips on how to make a good Gravatar default image.

In order to add the image you’ve made, you just need to take your Gravatar code and add the image URL right after the comma:

Before

<?php if(function_exists(’get_avatar’)){ echo get_avatar($comment, 50 );} ?>

After

<?php if(function_exists(’get_avatar’)){ echo get_avatar($comment, 50, 'http://www.wphacks.com/wp-content/themes/HackWordPressPro/images/nophoto.gif');} ?>

Great tip Michael!  You’ll want to click over to see Michael’s tips on creating a custom “No Gravatar” logo for your website.

Want automatic updates? Subscribe to our RSS feed or
Get Email Updates sent directly to your inbox!
Tweet This | Digg This | Stumble it | Add to Del.icio.us | | Print This

Kyle Eslick

Kyle Eslick is the founder and primary author of WordPress Hacks. You can learn more about him at KyleEslick.com or you can follow his personal tweets here.

There Are 2 Responses So Far »

  1. Arjen says:

    I did this trick, and it works great. I’ve made a gravatar which looks pretty similar to the default one, but I’m planning to replace the image soon with a better one.

    When I’m going to do that, the only thing I have to do is replacing the image on my server, as all the code work is already done.

    Thanks for sharing this!

  2. Hey great thanks! Made my site 100% unique now… check it out!

Trackbacks/Pingbacks »

Leave a Reply