Since so many people seemed to be interested, I went ahead and coded up my new Gravatars plugin: Easy Gravatars. It’s designed to be simple to use — just upload and activate. If you want it to be a little harder, you can visit the plugin’s options page to set the size and rating for the gravatars, and even set the location of a default image, and tweak the CSS a little bit.
Download: easygravatars.zip
I’m going to put it in the WordPress Plugin Repository when I get a chance. Once that’s done, I’ll update this post with the new location.
Update, 2007-11-16: The plugin is now in the repository, and you should now be able to see that version 1.1 is available: Easy Gravatars Plugin



84 Comments
Thank you!
Awesome. Playing with it now
Thanks for doing this Doug. I just hardcoded it, but I can think of a use for this (friends) so they have it, and have a little control.
I still like myAvatars better. But this is a nifty plugin. I hope people enjoy it.
Thanks !
I’ll use it right now on two blogs I manage externally from WP.com …
thx buddy for this
Hi Doug thanks for posting this but my gravatars wont show in the comments. A little help?
I’ve been looking for this plugin for so long. thanks for bringing it out
i also want to add avatar feature on my site..but quite confuse with how to set php settings..anybody suggest me where to add gravator link and how to set default setting .
What if I want to add the function that calls for the Gravatar in my comments.php? Actually, I tried it but it just gave me an error.
Was wondering if its possible to do a MyblogLog and Gravatar all in one plugin?
Like if the email isn’t listed in MyBlogLog it try and display Gravatar.
definately does not work with my theme

I’ll do some research when I’m at home what’s wrong, but atm it looks like it’s incompatible with a Google Analytics plugin I’m running. Switched back to plain simple <img class=”gravatar” src=”" />
Thanks for this plugin!!!
It looks like it is compatible with Google Analytics plugin I am using. Very nice plugin, I will be using it as well. Thanks a million.
shijirou: Are you saying that the plugin doesn’t work on your site, or that it’s not displaying your gravatar here? The plugin depends on the
get_comment_author_linkfilter hook. If your template is bypassing the functions that call that filter, it can’t insert the gravatar code. However, pretty much any template that displays the comment author’s name should be using the correct call. If you’re talking about not getting your gravatar to show up correctly, it might not be rated correctly? I only display “PG” or “G” rated gravatars here. Login to Gravatar, and hover over your icon to view the rating. Click the rating to change it, if necessary.worloct: With the Easy Gravatars Plugin, all you have to do is activate the plugin — it should automatically add the icons to your comments without any other changes needed.
Eric: If you want to add gravatars to your template manually, then this isn’t the plugin for you. Use the one from the gravatar.com site.
RageX: I’ll probably look into adding MyBlogLog functionality one day.
Christoph: Odd that it would conflict with another plugin like that — Easy Gravatars isn’t doing anything particularly unusual. Are you sure that’s what the problem was?
how to use it? It must be very cool.
Thanks. I installed it and modified it. It’s great.
Thanks. You did as promised!
I have to now look for that “comment_author_link” hook!
S.K
shijirou,
Some thoughts: Make sure you disable wp-cache if you’re using it. then re-emable after you install and test the gravatar plugin (or any plugin for that matter). Also, double check to make sure the email address you have set up for your wordpress user matches the email address you use for your gravatar account.
Hey… thanks for a great plugin (we’ve implemented it at WebHelperMagazine.com so y’all come by and comment). Question: While I do have a Gravatar, and it shows up via the WordPress.com comment postings, I do not see my gravatar show up at WebHelperMagazine.com (see specifically: http://webhelpermagazine.com/?p=193). On the page referenced, you will see a commenter’s gravatar shows up fine, while mine does not. Is this because I am an admin. for that site? Where does your plugin pull its gravatar images from?
Hello Dougal & All -
Hey… I figured it out. Went to Gravatar.com and added a Gravatar for my regular address, AND my admin address at http://www.webhelpermagazine.com. Worked great. So… if you have more than one address, you can set them all up at Gravatar.com. - Scott
Works great. I modified the CSS to display the gravatars properly on my theme. Thanks so much. I particularly like the ability to use different image sizes for those of us who want smaller gravatars.
Cheers!
Thank you for this little nice plugin. I can install it with a breeze. Take a look at my blog.
One question: how to put the avatar a little higher?
how to use it? It must be very cool.
Ulysses: Great job integrating the CSS into your theme!
jalansutera: Try changing the Span Style to:
float:right; margin-left:10px; display:block; margin-top: -1em;The “margin-top: -1em” should move it up by one text line.
Good work - works a charm on my site!
Wow that was easy. I spent a lot of time with the heavy official plugin but the results weren’t super great. This lightweight plugin did the job in less than 10 minutes, from download to fully-configured. Thanks for making it available.
Dougal,
One of the mods I made to your plugin for my blog was to link the gravatar to the commenter’s website. I bet others might like that option, too. You might want to add it for the next version
Thanks Dougal. I modified it ever so slightly but it works like a charm!
thank you so much for doing this. I used to have gravatars up, but I took them down ages ago because I change my blog according to the seasons and it was too much work to keep up with changing every theme. Now I have my own theme that I just change colors with the seasons and all is good. but adding this plugin made it so much nicer (and quicker) to do.
I do have one question: my gravatar shows up, my default gravatar shows up for those that don’t have one, but I know I have some commentors that have a gravatar and it is showing my default. do I need to do something different?
Other folks’ gravatars show up but not mine. Hmmmmm…
WELL! My gravatar shows up here but not on my site. Very odd.
This is a terrific plugin - thanks, Dougal, for doing this. I took the liberty to spruce it up a bit:
Improved admin page layout, including more verbose descriptions of each of the options.
Added Reset button to the admin page to delete all the options from the database.
Added ability to display a border around the gravatar image.
Display image as a link to the comment author’s web site (thanks to Elaine Vigneault for the idea).
You can find my changes on my web site at http://dpotter.net/Technical/index.php/2007/10/26/easier-gravatars/.
What I especially appreciate about this plugin is that I don’t have to change my themes. I still have a little work to do to get the images to display just how I want them, but it’s good enough.
Thanks Dougal,
David
nice plugins,thanks.
Thanks for released this. I’m still wieghting whether using or not using Avatar on my sites.
Just installed this plugin, but the gravatars don’t show in my comments… so this is a test to see if it work here
@RageX (11) there is already a plugin where it looks for Gravatar, Avatar and MyBlogLog http://kamajole.dk/plugins/mbla/
@Dougal, I activated the plugin, but it’s not showing any pictures on my page
http://afrison.de/endlich-wieder-online-neues-design-und-neuer-inhalt/493/
Where exactly has to be the get_comment_author_link filter hook to show the gravatars?
Thanks a lot
Alex
Thanks for the great plugin. I prefer it to all the other Gravatar plugins because I can use it without editing my theme files. That makes updating the theme much easier. I also like that you can edit the CSS from the options page.
I really appreciate this plugin. I’ve been periodically trying to add gravatars to my blog for at least a year. None of the other methods or plugins I’ve tried worked with my theme out of the box but yours did. There’s still an occasional problem with how it’s displayed but I’m almost certain that has more to do with the theme I use than your plugin. Thanks a lot for sharing it.
Hi Dougal
Here’s a thing…
I’ve got a gravatar and your plugin on my blog.
If I browse via Firefox, I can see all of the available gravatars from commenters that have them, including mine.
But… if I browse via IE, I can see all of the others except mine. I’ve got the correct email addy against all of my comments, my gravatar is rated G and I’ve got the options page configured to show X.
Here’s my post regarding the matter: http://beardedgit.com/?p=218
I would appreciate your views regarding this weirdness.
Cheers,
BG
Hi Dougal
Got me a gravatar (rated G) and installed your plugin, set to display X.
In Firefox I see all available gravatars from all commenters who have them, including mine.
In IE, I see all the others but mine refuses to show.
Any ideas?
Cheers,
BG
cool
thanks!
Thank you so much for this great plugin. It’s really easy to integrate and works perfect for me and my sites.
This is great, but having issues with it showing on my blog. As the page loads, it briefly shows the image where it should be, but nothing ever appears. And a few others have shown, but mine never does. :-/
We’re experiencing a bug with this plugin. Gravatar is correctly configured and the proper e-mail address is being used (as shown by my gravatar above). Here is the test case, which you’re welcome to try at our site: http://www.newpopehat.dreamhosters.com/?p=89#comments
Any help would be appreciated!
NOT LOGGED IN, NO AUTHOR HYPERLINK:
1. Commenter provides Name and Email, *** no Website ***
2. Result: Comment appears with Gravatar, “Commenter Says” text appears.
LOGGED IN, NO AUTHOR HYPERLINK:
1. Commenter’s profile includes *** no Website ***
2. Result: Comment appears with Gravatar, “Commenter Says” text appears.
NOT LOGGED IN, AUTHOR HYPERLINK:
1. Commenter provides Name, Email, and Website
2. Result: Comment appears without Gravatar, “Says” link appears without Commenter’s name, and with an invalid URL
LOGGED IN, AUTHOR HYPERLINK:
1. Commenter’s profile includes a Website
2. Result: Comment appears without Gravatar, “Says” link appears without Commenter’s name, and with an invalid URL
The “Says” link seems to contain formatting and placement info for the non-appearing gravatar; the defect seems to be that
< a href='is missing from the hyperlink, which then distorts the gravatar code.
Perhaps something about the plugin’s use of get_comment_author_link() is interfering with the Comment page’s own use of comment_author_link(). The return seems not to be formatting the hyperlink properly.
Confirmed that Christoph is right. We’re also running the GoogleAnalytics plugin, and seeing the symptoms described in comment 44 above. Disabling Google Analytics fixes the problem.
Naturally, it would be preferable to run both, but GA is the priority.
Where might they be in conflict? Here’s the particular plugin that breaks eg:
Plugin Name: Google Analytics for WordPress
Plugin URI: http://www.joostdevalk.nl/wordpress/analytics/
Dougal nice work, when have time i made a integration test.
Keep Going!
Okay, I’ve taken a look at the Google Analytics plugin, and I think I know why it causes problems with Easy Gravatars. That plugin also uses the get_comment_author_link API hook, later than Easy Gravatars does, and uses a greedy regular expression that’s trouncing on the image tag.
I’ll do some experiments and see if I can some up with a quick fix. I’ve also contacted the author of the Google Analytics plugin and made him aware of the problem and a possible fix.
Thanks for looking into it!
Cheers for this. Even though I knew how to put Gravatars manually on my blog, I just couldn’t be bothered to do it. Thanks.
Great plugin! Thanx!
But it doesn’t seem to be pulling my gravatar. At first it wasn’t doing so because I had actually created my blog and my gravatar under different emails. I’ve since added a gravatar to the admin email address and it is still showing the default gravatar. I used that admin email address here and it is showing the correct one.
I am having difficulty seeing gravatars in IE but they appear fine in FireFox. Also, this plugin seems to overlap everything in my commenting section. I’d rather have a line of PHP code to place into my comments.php file to really embed the avatar in the commenting area of the site.
thanks
Beauty work ^^
Thanks for this plugin. I like the idea of it, and have installed it on my site, but it isn’t showing my gravatar in my comments — and won’t show anyone else’s as yet because I’m only just setting a blog up. So I thought I’d leave a comment here, to say thanks, and to see if my gravatar showed up here. Cheers!
Mmm, only the default image here too. Must be a problem with the gravatar end then. Odd. I wonder if it might be because it’s a newly set up gravatar.
Do I need http://wordpress.org/extend/plugins/wp-cache/ for it to work?
Frozen: No, you do not need anything else for it to work.
Thank you. Too Cool!
For some reason my blog is putting up little squares/rectangles but they are empty of gravatar images. I don’t know what is causing the problem. Any ideas?
just trying it out
Get the latest version of the plugin from the Plugin Repository.
Hi Doug, this is a somewhat banal question, but how do I get the gravatar into the little quote boxes on my site? That’s the only thing that’s keeping this from being utter perfection, and it’s due to my suckage at coding. Thanks for a great plugin.
chuck: Try setting your span style in the Easy Gravatar options to this (note the new ‘margin-top’ bit at the end):
float: right; margin-left: 10px; display: block; width: 40px; margin-top: -0.5em;Very good one! Thank You!
testing
I tried editing the easygravatars.php file (in the WP plug-in editor), as I thought you meant in your comment #25. No success for any values of margin-top, negative or positive. The image seemed glued at its upper left corner.
However, when I made the change in the EasyGravatar *Options* screen, as you said in comment #62, it worked! Can you tell me why? Also, is there a reason you specified vertical displacement in ems rather than px?
Thanks for your work and especially for your support by answering all these pleas for help. You’re a champ!
Mico: Changing that value in the plugin code won’t matter, if the plugin is already installed and activated. At that point, the option is already saved in the database, and it will always look at that. So, when you change it via the Options page, you are setting the value that it really wants to use, see?
As far as why I used
eminstead ofpx, it’s because there’s no way for me to know whatpxsize you have chosen on your site. Theemmeasure is always relative to whatever your preferred text size is, so a value likemargin-top: -1em;should always (well, in most cases) move the image up by one text line. But if you want to set it in pixels instead of ems, go ahead, that’s why the options are there — so you can set it the way you want it.Wonderful, Thanks
Something happened to the plugin, I think today: when a Gravatar is not found, the default image is not read, a blank square from Gravatar is shown instead. Any idea why?
hi
brilliant plugin, this is the only gravatar plugin that has actually worked for me. I have noticed a few people who have left comments are moaning that it does not allow them to do certain things like styling etc. I have made some ammendments to the plugin to allow this. I won’t be offering it as a download but for those who are interested you can email me and I will help you out (all of this with the plugin authors permission of course.)
here are a few things I have done:
I took out the image tags to better control styling within the templates
i added a blank target so author urls will open in a new page (very handy for myself)
i added a few more option to the drop down box on the admin page so you can link the image to other comment_author tags, this helps with styling and gives more control.
I have yet to upload to my live site (will be shortly) so if anyone wants more info just drop me a line.
Dougal:
I hope these amendments are ok, and if you would like to drop me line please feel free.
Mark…
Awesome plugin! Going to be installing it very very soon. Thanks!
I been waiting for this plugin.. thank you so much..
Doesn’t seem to work
Thanks for the great plugin! Is there an easy way to use the Gravatar’s Identicons w/ this plugin? Thanks!
Shane: yes — just type ‘identicon’, ‘monsterid’, or ‘wavatar’ as the Default image url in the Easy Gravatars settings. I’ve been meaning to post about this, but just haven’t had time yet.
how do you make the gravatar icon not link to the person’s site?
Thank you for this nice plugin
Hi there–
I’m 127% sure this is the stupidest question you’ll receive today, but…
How can I force each comment to appear on a new line, rather than stacking up horizontally when an earlier comment isn’t long enough to scroll past the gravatar image? (In the screenshot at http://threetwelve.net/images/misc/egscreenshot.jpg, for instance, the text “David posted the following…” should line up with “Amie posted the following…” above it, rather than appearing to the right of Amie’s gravatar.)
Thanks for whatever wisdom you can provide!
: )
David
Just testing
I got it–I had two plugins competing for comment style. :-p
Ye i whas wondering wich plugin i need for this.Becuas it is a great thing.
Going to download it now and will try it out.\/\/
test
?? ??… ??? ??? ? ?????????: ? ??? ?????? ????????? ? ??????.:)
This is a cool plugin, thanks Doug.
Thanks for this plugin!!!
45 Trackbacks
[...] on his personal blog. Apparently, so did Dougal Campbell, who has cooked up a wonderful little Easy Gravatars Plugin using Matt’s code snippet. Thanks to these guys, I signed up and made a Gravatar, and now [...]
[...] Easy Gravatars makes it simple to add Gravatars to your blog. [...]
[...] Easy Gravatars Una manera fácil de añadir Gravatar a tu blog. [...]
[...] Easy Gravatars makes it simple to add Gravatars to your blog. [...]
[...] instalar el plugin, solo debes bajarlo , subirlo a nuestro host y activarlo. Como cualquier plugin, en fin. Related PostsPack de Wallpapers [...]
Easy Gravatar…
Namanya juga Easy Gravatar. Installnya tentu saja mudah.
Selama ini saya suka dengan produk dan layanan dari Automattic-nya Matt Mullenweg. Sejak awal saya adalah pennguna WordPress yang setia meskipun tidak paham bahasa pemrograman PHP dan sejenisnya….
[...] ma se è l’essenzialità ciò che cercate questo farà al caso vostro Easy Gravatars, è uno di quei plugin da attivare e [...]
[...] åíóùìÜôùóç gravatar óôá Wordpress blogs. Ôï ìüíï ðïõ ÷ñåéÜæåôáé íá êÜíåôå åßíáé íá åãêáôáóôÞóåôå ôï Easy Gravatars Plugin êáé öõóéêÜ íá Ý÷åôå ôïí áíÜëïãï ëïãáñéáóìü óôçí [...]
[...] have Gravatars installed on your blog or plan to install it, you can try out this cool new plugin - Easy Gravatars. This plugin is ideal for WordPress users who don’t have much CSS or HTML coding skills or [...]
[...] mean: I’ve installed the easygravatars plugin Share [...]
Easy Gravatars Plugin…
Meskipun sebelumnya blog ini telah dilengkapi degan plugin gravatar2 buatan Kip Bon. Namun hasil yang didapat belum seperti yang diharapkan. Walaupun telah bersusah payah dengan proses instalasi yang di bilang tidak cukup mudah, Menu gravatar option ak…
[...] Campbell provided a much nicer implementation for adding gravatars to your comments called Easy Gravatars. This solution doesn’t even require you to modify your theme files. Very [...]
[...] installed a nice WordPress plugin that makes this blog Gravatar enabled. If you have a Gravatar account and you leave a comment on my [...]
[...] wordpress δεν άÏγησε να βγει. Σκεφτόμουν να εγκαταστήσω το easy gravatars plugin στο νÎο template αλλά άλλαξα γνώμη μιας και θα πάÏει καιÏÏŒ [...]
[...] ผมคัดปลั๊à¸à¸à¸´à¸™à¸¡à¸²à¹ƒà¸«à¹‰ 1 ตัว คืภEasy Gravatars ไปที่ลิงค์ –> ดาวน์โหลด –> [...]
[...] geek ramblings » Easy Gravatars Plugin (tags: wordpress plugins) [...]
[...] Easy Gravatars: Dougal released this plugin a few days ago and I was itching to install it. I muddled with his original code a little, played around with my own CSS, tweaked the next plugin to work with Gravatars and viola! Thanks Dougal! PS: If you do not know already, Gravatar is now owned by Automattic and response times for loading the Gravatars is minuscule. After I installed the plugin, I did not even have to check to see if I had a Gravatar. The system had already picked up my profile from WordPress.com. Do you have your own Gravatar yet? [...]
[...] mir das Plugin EasyGravatars geschnappt und funzt super bequem. Aktivieren, roger, schon werden die Bildchen zu den [...]
[...] Today Robert@Basic Thinking posted a new Gravatar Plugin: Easy Gravatars Plugin [...]
[...] hat gestern über ein Plugin für WordPress berichtet, mit dem die totgeglaubten und mittlerweile durch automattic wieder [...]
[...] den Blog-Kommentaren die Avatare angezeigt. Das ganze gibt es nun auch mit einem schönen kleinen Wordpress-Plugin. Na mal schauen ob ich es weiterhin nutzen [...]
[...] å‰é¢æˆ‘å†™è¿‡ä¸€ç¯‡ä»‹ç» Gravatars çš„æ’件:WordPress å¤´åƒæ’件:Gravatars2,个人觉得已ç»å†™å¾—éžå¸¸è¯¦ç»†äº†ï¼Œä½†æ˜¯è¿˜æ˜¯å¾ˆå¤šäººé—®æˆ‘问题,åƒå¥‡ç™¾æ€ªï¼Œç›´æŽ¥å¸®æˆ‘æ™•å€’ï¼Œå…¶å®žå¾ˆå¤šäººæ˜¯æ ¹æœ¬æ²¡æœ‰çœ‹ä»”ç»†é‚£ç¯‡æ–‡ç« ï¼Œé‚£å¥½å§ï¼ä»Šå¤©å°±ç»™ä½ 介ç»ä¸€ä¸ªéžå¸¸ç®€å•çš„ Gravatar çš„æ’件: Easy Gravatars Plugin。如果这个æ’件使用还有那么多问题,那åªèƒ½è‡ªå·±å¥½å¥½æ£€è®¨ä¸‹æœ‰æ²¡æœ‰è®¤çœŸé˜…读别人的日志ï¼:-) [...]
[...] Dougal Campbell wrote a quick n’ Easy Gravatar plugin - great [...]
[...] geek ramblings » Easy Gravatars Plugin [...]
[...] getting hotter and hotter and I’m guessing it will be a standard on WordPress blogs soon. I used Easy Gravatar and then added the modifications described [...]
[...] Easy Gravatars by Dougal Cambell [...]
[...] Easy Gravatars plugin is now in the WordPress Plugin Directory, and I’ve released version [...]
[...] Enlace y descarga | Geek Ramblings [...]
[...] to consider besides the Gravatar WordPress Plugin are WordPress Gravatar Plugin by Il Filosofo or Easy Gravatars by Dougal [...]
[...] plugin: Easy Gravatars. It’s designed to be simple to use — just upload and activate.read more | digg story digg_skin = ‘compact’; digg_title = ‘Easy Gravatars Plugin for WordPress’; [...]
[...] a blog owner has to do is add a few lines of code to their templates (or install a plugin), and the right avatars show up in the discussion [...]
[...] Easy Gravatars (http://dougal.gunters.org/blog/2007/10/24/easy-gravatars) 1.1 [...]
[...] daß ich ein Problem mit dem Gravatar-Plugin habe. Daraufhin schrieb Julia, das sie das Plugin Easy-Gravatars nutzen [...]
[...] WordPress users can use the Gravatar WordPress Plugin from the Gravatars site, or chose from the Easy Gravatars WordPress Plugin or WordPress Gravatar Plugin by Il Filosofo. Both have excellent features and [...]
[...] Bila pada tulisan terdahulu, saya sempat menjelaskan dengan panjang lebar bagaimana menggunakan gravatar pada blog berplatform wordpress. Kali ini, saya mau menyinggung salah satu plugin yang cukup berguna untuk kegunaan yang sejenis. Plugin yang kumaksud adalah Easy Gravatars. [...]
[...] Ñ CSS. Страница автора Ñ Ð¾Ð±Ñуждением плагина здеÑÑŒ [...]
[...] Visit [...]
Featured Plugin: Easy Gravatars…
I’ve been wanting to mention some WordPress plugins by other people that might not be directly related to bands, but you might find fun or useful anyway.
If you aren’t aware, the company that owns WordPress, Automattic, recently acquired Gr…
[...] lots of people will ask, I checked my plugins, and most of them (HeadMeta, Text Filter Suite, and Easy Gravatars), work just fine. The one that doesn’t work is Theme Preview. When I can find time, I’ll try to [...]
Easy Gravatars 1.2…
Earlier today, I released Easy Gravatars version 1.2. The only change (besides confirming that works in WordPress 2.5, currently in beta, due out next week) is that when installed under WordPress 2.5 or newer, it will use the new core get_avatar() fu…
[...] I have upgraded to Wordpress 2.5 and implemented the Easy Gravatar plugin from Dougal Campbell for commenters. If you want a cool photo next to your comment, register on [...]
[...] Easy Gravatars Plugin (tags: avatars gravatars plugin wordpress wp-plugins gravatar) [...]
Easy Gravatars Plugin…
Add Gravatars to your comments without modifying any template files. Just activate, and you’re done!…
[...] Easy Gravatars Gravatars são avatars (ou, como são conhecidos em português, imagens de exibição) globalmente reconhecidos. Basta efectuar o registo em Gravatar.com e de cada vez que comentar um artigo com o endereço de e-mail com que se registou surgirá o seu gravatar. Graças a este plugin não é necessário efectuar alterações ao seu tema para que suporte esta divertida forma de comentar; tudo é feito automaticamente! Compatível com: 2.0.4 ou superior Página Oficial [...]
[...] Easy Gravatars - Just a few hours after I got this setup, my friend Connor wrote how to show gravatars without a plugin. Very easy, I might switch to that instead to reduce a bit of strain on the server. [...]