Create Your Own Image to Change The Default Gravatar in WordPress
19th Mar 2010 | Posted by Eko S. | 25 CommentsWordPress provides some images to choose as the default gravatar, this gravatar will be appear if a comment doesn’t have gravatar. Can we change these default gravatar? We want our comment section is unique and give a more personalized touch. In this tutorial we’ll take a custom image and add it as the default gravatar.

If we see the others famous blogs, most of them use this feature…let we see the example below :
How to?
Please look the goal of our project as shown below

Step 1 – Create an image for gravatar in photoshop
- Make a new file, we will make an image of size 400×400 pixels

- Then make a background for this image, I choose the color [#0054a6] and [#0d004c] then with the gradient tool I drew a line from the top left corner to bottom right corner.

- Now we make the logo, in this tutorial I make a written ‘DW’, with the settings as shown below
Then on the Layer Style, I make the settings as shown below

And see the result
- Next we make the ribbon. I made a square image with color #0054a6 and the size of as shown below
Then on the layer style, I use the feature “Drop Shadow”, “Gradient Overlay” and “Stroke” with settings as shown below.

And see the result
- Make a written “guest”, with the settings as shown below

Then on the Layer Style, I use the feature Gradient overlay with the settings as shown below

See the result
- Finally, resize our image with the size like 128x128px or 80x80px or 64x64px or 32×32 px, as shown below

Download
You can download these free gravatar images, six images .png files at 128px.
free_gravatar.zip (35.2 KiB, 318 hits)
Step 2 – Upload your image
Use FTP tools, then upload to your theme directory “wp-content/themes/yourthemes/images” or you can use the wordpress admin panel > Media > Add New
Then choose edit in your image to see the url link to the image.
Step 3 – Adding new code to function.php
Thanks to build internet for this code (please open the link for more detail explanation)
<?php
add_filter( 'avatar_defaults', 'newgravatar' );
function newgravatar ($avatar_defaults) {
$myavatar = get_bloginfo('template_directory') . '/images/gravatar.jpg';
$avatar_defaults[$myavatar] = "Build Internet";
return $avatar_defaults;
}
?>
Please change this line in accordance with your image link
$myavatar = get_bloginfo('template_directory') . '/images/gravatar.jpg';
Save it.
Step 4 – Change the default gravatar with your own image
In wordpress admin panel > Settings > Discussion
Give the check on a new image that we make before to make it the default gravatar.
![]()
That’s all, but I would love to hear your thoughts and suggestions in the comment section below on any areas that you need further clarification or that you would do a little bit differently.
15 Comments to “Create Your Own Image to Change The Default Gravatar in WordPress”
Add Comments (+)-
Thanks so much for this! Very useful
-
It’s amazing how you managed to make simple things that until a few days ago seemed complicated. Thanks again for the post
-
Thanks for your detail n excellent tutorials :cheers:
-
Nice post thank you for sharing!
-
I was did this tutorial and great… My blog look awesome and professional. Thanks.
-
Thanks! This makes my blog look much more professional and keeps the theme.
-
Thanks a million for this.
Super easy tut and love the result.
-
Really GREAT!
I was looking for a tut like for a long time and now I got the solution.
THX!-
* I forgot “this” in a sentence
-
-
Thanks for this tutorial. I just created my own default gravatar for my blog and I’m very happy with the results. It was easy to follow and get working. I think many can do this change with ease and maybe WP should make it possible to upload a gravatar in the backend without adding a function
-
I have just posted about this little hack and it will be published later today with a link back to this post. I hope many others will try it and give their blog/site a personalized look and feel.
Trackbacks/Pingbacks
- CSS Brigit |
- wp-popular.com » Blog Archive » Create Your Own Image to Change The Default Gravatar in Wordpress | DynamicWP
- uberVU - social comments
- London’s Strata SE1 Skyscraper Boasts Built-in Wind Power | nachhaltiger.net
- 2010-03-24 유용한 링크 | We are connected
- WordPress Picks for the Week [03/24] | Techtites
- How Repair Your Own Laser Printer | Cheap printers
- iPad 101: Customize your wallpaper | The Apple Ipad Blog
- Fun Day Theme | DynamicWP
- Create your OWN WordPress Default Gravatar within Minutes | Serradinho





































I wanted to thank you for this excellent read!! I definitely enjoyed every little bit of it. I have you bookmarked your site to check out the new stuff you post.