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:


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


<?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.

Kyle Eslick is WordPress enthusiast who took his passion for WordPress to the next level in 2007 by launching WPHacks.com as a place to share hacks, tutorials, etc. Follow Kyle on Twitter @KyleEslick!

  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. Slim Fit T-Shirts says:

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

  3. manik arum says:

    very simple trick, and it works
    but it doesn’t work on child comment yet (i’m sure it is because the thread comment plugin i used)

Trackbacks/Pingbacks »

  1. Teman?zdaki Gravatar Alan?n? Biçimlendirin · Yakup Gövler'in Not Defteri says: