Yesterday I decided to edit the gravatar settings for the images in my comments. I wanted to make the gravatars smaller and use a custom image for commenters who don’t have one rather than the default gravatar image.
I use the gravatar plugin and the following code is in my comments template file. You will want to locate this code in your comments template, if you want to make any of the same edits.
<?php gravatar(); ?>
There are 4 conditions that can be used with the gravatar code; rating, size, alternative image, and border.
Gravatars have ratings similar to movies. If you want to show gravatars that are rated not higher than R, you would put R in the conditions and everything rated R and below will show up in the gravatars. I’ve never seen gravatars rated higher than than that but maybe I don’t visit those sites.
The default size of the gravatar is 80×80. This is what the size will be if you don’t put anything in the conditions. I thought this was too big, so I changed it to 50.
This is the default image that is used when a commenter doesn’t have a gravatar. I wanted to change it to a logo for my own site. I uploaded the image to my webhost and then added the path to it in the conditions for the gravatar code.
The final condition that you can set is a color for a 1px border. I decided not to add this.
The changed code now looks like the following:
<?php gravatar("R", 50, "https://www.kimwoodbridge.com/wp-content/ themes/kimwoodbridge/images/asd2.jpg"); ?>
On a side note, this is my 100th post. It’s hard to believe but here’s to 100 more.
Ron Obvious says
Congratulations, Kim! I can’t believe you’re at 100 posts already. Its been a lot of fun watching the site grow from the first post. I can’t wait to see where the site goes from here and I hope you celebrate many more anniversaries in the future!
I also love your (A)SD logo and really like your decision to use it instead of the Gravatar logo. The Gravatar logo can be a real eyesore.
Ron Obvious’s last blog post – The Sidewalk to Nowhere.
Kim Woodbridge says
Thanks Jim! I know – I can’t believe it’s been 100 posts – it seems like I just started and was trying to decide on a template for the site.
I’m glad you like the gravatar changes. :-)
Madhur Kapoor says
I will mess with this on my local wordpress installation. And congrats on reaching 100 posts
Madhur Kapoor’s last blog post – Resize Images with Imgares
Kim Woodbridge says
Hi Madhur – Thank you!
Are you going to add gravatars to your site?
Mike Nichols says
Thanks, Kim, for the gravatar tip. I’d been wondering what to do about the default ugly images, and now I know! I like how you are using an attractive site logo for the default. Did you create the gravatar yourself?
And congratulations on your 100th post! Looking forward to the next 100, 1000…
Mike Nichols’s last blog post – What Can I Do? Helping a Friend or Family Member with a Mental Illness
Kim Woodbridge says
Hi Mike,
Thanks for the congrats!
I did not create the gravatar image but it’s kind of a funny story. One day I was helping someone I barely knew on Twitter with problems he was having with his theme. We ended up following each other and I helped him throughout the weekend. Turns out he is a graphic designer and when I mentioned I needed a little logo (it’s actually resized from the 125×125 image he made) he offered to make it for me for free because I had already helped him so much.
He also gave me some good tips so if I had to make it now I probably could. He’s @RickWolff on twitter.
Vered - MomGrind says
Thanks, Kim. I’ve been toying with the idea of adding gravatars. Saving this one for possible future use. :)
Vered – MomGrind’s last blog post – Women Who Say No To Photoshopping
Kim Woodbridge says
Hi Vered – Glad it was useful! After the weekend I’ve found things to write about again.
Ari Herzog says
Why do you like gravatars more than Monster IDs and the like? I switched to an automatically-generated Wavatar system the other day; if you add a comment to my blog and you don’t have a custom avatar, you get a random image. Check it out… not just YOU Kim, but everyone else!
Ari Herzog’s last blog post – Be Aware of Your Computer and Online Security
Kim Woodbridge says
Hi Ari,
I think it’s because gravatar has become the standard that is most used.
Does wavatar work with gravatar? Is it a separate plugin?
Ajith Edassery says
I have a problem with my gravatar. On some sites it shows my logo and some other sites my face. Is it because some of them use different code to get gravatar? (I have WP avatar as well as gravatar)
Cheers,
Ajith
Kim Woodbridge says
Ajjith,
What is a WP avatar and how does it differ from a gravatar?
Are both images associated with your gravatar account or just the logo (that’s the one that always shows up on my site)?
When you leave comments do you always use the same email address? Do you have more that one gravatar account? The most frequent gravatar problem is someone posting a comment with an email address that isn’t associated with the gravatar account.
kuanhoong says
Hi Kim,
Congratulations on your 100 posts.
As for my blog, I am using gravatar and mybloglog avatar for my site.
kuanhoong’s last blog post – Benchmark your web site with WebWait
Kim Woodbridge says
Hi Kuanhonng – Thank you!
Ajith Edassery says
I checked my comments.php that I had changed.. it has a get_avatar() call alone. In fact, I remember seeing my face on several places where I commented now can’t recall them. Will definitely report it once I see it again :) Not sure if I have any other avatar than gravatar elsewhere !
Btw, congrats on your 100th post Kim!
Cheers,
Ajith
Ajith Edassery’s last blog post – 10 tips to get the passive reader do something by being positive yourself!
Kim Woodbridge says
Ajith,
That’s the gravatar code when you don’t use the plugin. I use the plugin and my code is for the plugin.
http://codex.wordpress.org/Using_Gravatars
I’m still not sure why you have different ones showing up though …
Ajith Edassery says
Hey I figured it out finally. I was dang sure that I had only one gravatar image (the D$ logo) and I verified it again. On some blogs my face was appearing and I found that they are using mybloglog (MyAvatars) avatars. e.g. Check out my comment here…
http://www.wpthemedesigner.com/2008/10/09/make-money-online-choosing-your-niche/
I never used myavatars nor I customized it. But I guess anybody can pull it out from the mybloglog profile that has an image.
Ajith Edassery’s last blog post – 10 tips to get the passive reader do something by being positive yourself!
Kim Woodbridge says
Ajith,
I’m glad you figured it out – I didn’t know the images in mybloglog could be used that way. And since my images are the same, I would have never noticed the difference. :-)
Madhur Kapoor says
@Kim
I am thinking of doing a redesign in 1-2 months. Then i will add gravatars to my blog
Madhur Kapoor’s last blog post – eCalc : Free Windows Calculator
Kim Woodbridge says
Madhur – Cool! I can’t wait to see it.
Wordpress How To says
I bookmarked it.
Thanks
WordPress How To’s last blog post – How To Post Articles With WordPress
Kim Woodbridge says
@WordPress How To
I’m glad you found the article useful.
Ian says
Thanks for this post, Kim.
That default image parameter had been hiding from me until now!
Ian’s last blog post – Free WordPress Theme – ThreeColumnsBlue
Kim Woodbridge says
Hi Ian – Thanks for visiting and for commenting! I’m always excited to see new people.
The image size is tricky. The default doesn’t require any code so it’s hard to know that there is something there that can be changed.
Ok – now I’ve got to check out this free theme that you have :-)
Ian says
Yeah, it’s the fact that by default there are no parameters with the function.
I have to confess to being a lazy developer and only try to find things out when I need to.
Glad you’ve tried the theme, I hope to release another free theme in the next few weeks.
Ian’s last blog post – Free WordPress Theme – ThreeColumnsBlue
Kim Woodbridge says
Ian – That doesn’t mean you are lazy. You might be really busy. Occasionally I get motivated to learn something new but usually end up learning things when I need to know them.
Ari Herzog says
Seeing your response now (don’t know why I didn’t see it earlier) but yes, wavatars provide random avatars if you don’t have a gravatar.
Ari Herzog´s last blog post – Roundup: 5 of 49 Ways to Share Online