Gravatar Properly Syncing Again

March 02, 2007 | Posted by Tom Werner

I want to apologize for the spotty gravatar syncing that has been occurring over the last two weeks. I’ve finally identified and fixed the bug that was causing the problem and your gravatar selections should propagate correctly now. I will go back and re-sync everyone just to make sure all the failed syncs get done.

The way Gravatar 2.0 deals with serving gravatar images is a multi-step process. When you assign a gravatar to an email address, the system takes your image, creates 80 scaled images from that (from 1×1 to 80×80) and puts them into a directory structure that will allow the gravatar serving lighttpd servers to serve them directly as files. Once the directory structure is created, it is tarred and gzipped to create a single compressed file that represents the images for a specific email address (based on the sha1 of the address). This file is then uploaded to Amazon S3 for distribution to the gravatar serving servers (of which there are 2). In addition, a message is placed on a queue for each server (via Amazon SQS). This completes step 1. On each gravatar serving server there is a process that pops messages off its queue, downloads the stated file from S3, and extracts it into the correct location. It is then available for serving to the internet. This completes step 2.

The problem was that the library I am using to interface with S3 (AWS/S3 in Ruby) had a bit of a quirk that seemed like it should have worked, but didn’t. For the benefit of others, I present the problem code and the solution.

The original, offending code:

:access_key_id     => '***********************',
:secret_access_key => '**************************************'

bucket = AWS::S3::Bucket.find('gravatar')
archive = bucket[sha1 + ".tar.gz"]

This code connects to the S3 service, gets the ‘gravatar’ bucket, then grabs the file from it. Simple enough, but misleading. When you get the bucket, only the first 1000 items within it are returned (a byproduct of the Amazon S3 API). Then, when you try to grab your file from the bucket, the file will be returned only if the item was within those 1000 items. This explains why Gravatar worked fine at first, then degraded to where fewer and fewer successful syncs where happening. It’s a devious bug to detect, and the documentation was not forthcoming on why this might be happening.

If you know that the object you’re interested in is in S3 but it can’t be found during a lookup, you’ll want to fetch the item directly, thereby eliminating the problem of a maximum of 1000 returned items. In retrospect, this is obviously the more desirable way to do things.

Here is the fixed code:

:access_key_id     => '***********************',
:secret_access_key => '**************************************'

archive = AWS::S3::S3Object.find(sha1 + ".tar.gz", 'gravatar')

So, if your gravatar has not been appearing properly, you can reassign it to your email address and it will propogate now. As I said before, I will push the entire contents of S3 onto the queues to make sure everyone is up to date.

I’m very sorry this problem took so long to fix, and I understand your frustration. I hope you will once again be happily gravataring!


190 Responses

  1. Benke says:

    It works!?

  2. MissHagrid says:

    Thanks for the response, Tom. I re-associated my avatar and am seeing if it’s working now.

  3. Let's see again says:

    alright then the Blue G YET AGAIN

  4. Dennis says:


  5. Let's see says:

    alrighty then

  6. AntBee says:

    Thanks Tom! Mine has been working smoothly since Gravatar 2.0 was launched. I hope this is really the end of the problems so everyone can go on with their lives again.

  7. Tom Werner says:

    The Syncing servers are fixed but still catching up from being down before. I’ll post another comment once they’ve caught up. Looks like I need *another* server.

  8. Gillian says:


  9. Quinn says:


  10. Khalidah says:

    Thank you Tom for the email and update
    It is working fine now 🙂

  11. sdvgc says:

    Why is the URL still with .php? And MD5? Shouldn’t there be a new URL?

  12. Okay says:

    Thanks for the “catching up comment” becaseu I was wondering

  13. Thank you!! says:

    Finally I didn’t want to have to send Bokeem Woodbine to your house!!!

  14. Lily says:

    Looking forward to seeing my avatar!

  15. Afiya says:


  16. Lubos Motl says:

    Thanks for fixing it, Tom.

  17. msk01 says:

    Hope it works now. Just test.

  18. Storm says:

    Great! Refreshed my WordPress plugin cache and it came straight up. Great job! Thank you for having made a very cool web feature!

  19. Tom, I’m still seeing an old icon that’s long-since been deleted. Have just tried re-confirming via the admin again. If it works you should see a light bulb.

  20. patri says:


  21. Robyn says:

    This is a test to see if my Gravatar will finally work.

  22. Stephen says:

    Testing, 1, 2, 3.

  23. JET says:


  24. Help! My avatar is still not showing up. It is rated “G”. It has a green square around the picture both below the email address and around the address with the picture. The email address matches exactly on the site where I want the avatar. What am I doing wrong? Or is it still slow from the earlier problems???

  25. Pablo says:

    Testing 1,2,3 🙂

  26. Chris says:

    testing 1-2-3

  27. Dave says:


  28. Nick says:

    Testing testing, 1 2 3 🙂

  29. Alice says:


  30. Alis says:


  31. Katie says:

    OMG YAY!!! I am so happy now 😀

  32. Angi says:

    It works! 🙂 Thank you so much Tom!

  33. Torley says:

    C’mon testing testing what will hopefully show up as my NEW gravatar… *awaits*

  34. Jungkeuny says:


  35. powwow says:

    testing my avatar

  36. ZappoMan says:

    If this works, I will be happy… Tom’s explanation certainly makes sense!

  37. Kirsten says:

  38. bluepanjeet says:


  39. LUCIana says:

    great TOM!!!thanks!!!

  40. Mindy says:


  41. Sly says:

    Just checking if it works.

  42. bennie says:

    thx for this beautiful lil work!

  43. Hi there,
    I tried several times to signup for a Gravatar account but every time I get this message :
    «Application error

    Change this error message for exceptions thrown outside of an action (like in Dispatcher setups or broken Ruby code) in public/500.html»

    Quite frustrating because I would really want to use Gravatar for my comments on my blog !
    I also tried to see if I could get the answer by meself but the Help page seems to be “underway”.

    Thanks for reading this.

  44. dawnh says:

    Still not work!

  45. Sabine says:

    My gravatar has stopped showing up in my blog comments (it just shows that blue on white gravatar icon) 😦 Now I’m trying to see if it works here. Let’s see…

  46. Help Now says:

    What is the URL to pre-fill in the e-mail address? = doesn’t work. = doesn’t work. = doesn’t work.

  47. campingLisaB says:

    Testing my gravatar

  48. marin says:

    testing my gravatar

  49. Daniel says:

    Crop is not working properly with Firefox under Linux. It says it don’t work with my browser and I should try Firefox, even tho I already use Firefox (But on Linux, maybe your browser check is bugged)

  50. Thanks for getting this fixed!!!!

  51. Benedikt says:

    Check, check, 1, 2, 3…

  52. Corrado says:

    Man, it’ll be nice if this works. A bit of ‘customer service’ in the form of an announcement a few weeks ago would’ve been nice.

    Glad it’s (apparently) fixed!

  53. Lapper says:

    Does it work!? Does it work?! Is Tom finally back? Testing…

  54. aoyoyo says:

    Not working at my site.

  55. Zanthina says:


  56. Test says:


  57. matija says:


  58. Balud says:

    Just to see if my gravatar will appear. I have registerd from 15th of Feb and no gravatar seen

  59. Kaos says:

    Me happen something strange. I can see avatars and my friend’s avatars but my friends cannot see their avatar.

  60. riza says:

    something wrong, it’s only the blue g

  61. The Mole says: it here?

  62. Todd says:

    Testing as well…

  63. Renee says:

    Apparently the site died… get a 403 error…

  64. gailv says:

    It can show up here, but why not on blog?

  65. Please says:

    Would be grand

  66. Ren Yushiro says:

    Wanna test too ’cause in my blog, it doesnt work

  67. Me says:

    Does it work?

  68. BCSEEATI says:

    Gravatar reassigned… testing…

  69. cmon gravatar says:

    what’s wrong if it only works here

  70. PK says:

    Just a test to see if it is working here (what about an official test thread ;-))

  71. Ulf says:

    test test test. Nope

  72. 800A says:

    Yeah! gravatars works in my blog!! great job Tom 😉

  73. silpheed says:

    yay for gravatars! i’m implementing them in my blog as we speak, but i think i might have found a bug. i’ve deliberately given my gravatar a rating of X and set my src strings to accept PG or below only (with &rating=PG). i also specify a default avatar (properly url encoded of course), but that default avatar doesn’t show for my X rated gravatar, i just get the blue icon with the white g.

    the default avatar DOES work for invalid gravatar IDs and valid gravatar IDs with no picture associated, but not for gravatars that are rated too high. is this expected behaviour? am i going mad?

  74. Lizzie says:

    Hi, testing but mostly wondering why my gravatar is rated x when it should be rated G.
    Thanks to this it doesn’t show anywhere, could you fix it please?

  75. testing says:


  76. c.urdaneta says:

    Thanks for the fix Tom
    Now my Gravatar works like a charm!

  77. Astorg says:

    Well, I’m really glad if its fixed at long last. Welcome back.

  78. Diane says:

    This is a test.

  79. leila says:

    siri e alemao

  80. Questan says:

    Tom: Will you sell Gravatar to Google? What guarantees do you give your users? Is it safe to implement? You never give any news.

  81. S3 is keen. We’re using that over at CrazyEgg for our screenshots.

  82. The whole rating thing is a mess, whoever decided a) never even point out that there ARE ratings on gravatars anywhere in the signup process, b) to make the default rating X, and more importantly c) to make the UI for seeing what it is rated, and or setting the rating completely obtuse, should be shot.

    I’ve been wondering for ages why my gravatar didn’t show anywhere, just the BLUE G. Happened upon a post that mentioned ratings (never had heard of them). Stumble around here, and find that magically if I hover my mouse near my image, some cryptic X comes up. What’s that? I click on it, and it tells my I’m X rated. Choose ‘G’, and say OK. Test it. Still the BLUE G. Hmmm… so I select to make the same gravatar (now apparently G rated) the current one, and magically it works.

    How about some documentation and a BIG HUGE INDICATION OF WHAT THE RATING IS, AND HOW TO SET IT?


  83. felipe says:

    ca marche ?!

  84. Barbra says:

    Does it work?

  85. Mark says:


  86. ItISDeaD says:

    Gravatar is dead…

  87. Piggy says:

    Hmm… doesent seem to be working :S

  88. Mar says:

    my gravatar doesn’t work

  89. Liisa says:


  90. Utena says:

    Is it working now ?

  91. kristy says:

    I have been trying to join all day today, and keep getting an error message. Just thought I’d mention it. You know. 🙂

  92. Mary says:

    Why my new gravatar dont show up??

    OMG ¬¬!!

  93. Remy Sharp says:

    Hi there,

    I’m consistently getting the following error when I try to add another email address to my account:

    Application error

    Change this error message for exceptions thrown outside of an action (like in Dispatcher setups or broken Ruby code) in public/500.html

    Sorry I had to post this in the comments to a blog, but I couldn’t find any other way of notifying of the problem.

  94. Hell Paris says:

    Hope works!

  95. Somebody says:

    Testing! =P

  96. Jana says:

    I only get the Blue G when I post to any sites…but my Gravatar is showing up in my account. Any clue why???

  97. ashton says:

    i’m back to test.

  98. Jakub says:

    This service is pretty cool.

  99. Jeff says:

    People, Liisa is correct. At this time only JPEG graphics are working for some reason. If you want to add a new Gravatar, first make sure your image is saved as a .jpg file and then add it to

  100. Mike says:


    The image you uploaded maybe to large in pixel size or file size that the site has set for allowed perams. Check with the site(s) that you go to and ask what their limitations are. They may even not know that their image convert program is not working possibly.

  101. Now it works. I went back into my profile and “re-confirmed” the current one. That seems to have properly forced a sync.

  102. S-King says:


  103. h0bbel says:

    Gravatars are back. Thanks!!

  104. Sad says:


  105. Liesbeth says:

    it still don’t work for me, this is what I see when I click on the button: this page is not availeble

  106. daphne says:

    It still has not worked for me. What am I doing wrong?

  107. james says:

    Testing. Sorry for bothering you.

  108. tentirujo says:

    not working 😥

  109. ping says:

    Checking my avatar…

  110. Fabric says:

    At last bugfix

  111. hanzo says:

    Finally everything seems to be working!

  112. Barnim says:

    Schau mer mal, obs jetzt funktioniert … testing

  113. Jason says:

    Finally, back on 🙂

  114. Freddy says:

    That sounds good!!!!

  115. welmar says:


  116. StarChild says:

    I didn’t see a forum where I could ask this and there is no help available yet so I thought I’d try here and see if anyone could help me. For months I’ve been having the problem that no one’s avatars show up on my site. They used to work, and then just stopped working one day suddenly. Everyone just gets my default av. And I KNOW that many of those commenters have gravatars. At first I thought it was because of the new launch coming up, but gravatars on other blogs were fine. When I check the cache everyone has NO GRAVATAR(E). No amount of cache deleting or refreshing has fixed it. My local gravatar works fine. Just not the other ones. Has this happened to anyone else? Any thoughts on why this could be? It’s driving me crazy!

  117. blang says:

    How can I recognize the default Gravatar image is being returned and decide in my blog to not show it – or in my case, use another image?

  118. Rob says:

    Nice one. Hopefully mine should start working soon……

    I signed up on Feb 16 and have not seen it working yet!

    Fingers crossed….

  119. chaoskaizer says:

    its work fine. yeah

  120. Tatiana says:

    how I can modify my password?

  121. buchin says:

    testing gravatar

  122. Jeff Cristi says:


  123. Cris says:

    Curious… it appears that when a default avatar is specified, the rating gets applied too strictly. I have a G rated avatar, and it shows up when the url string says rating=G, but when it says rating=PG, the default appears.

    I expect the rating specification to mean “this rating and below,” not “only this rating.” And that’s how it seems to work when no default is specified.

  124. @lun says:

    Yes it does 🙂
    ’bout time an all 😀

  125. Eli Sand says:

    Not sure how long it’s supposed to take before the avatar is synced, but mine isn’t working after almost 24hrs. Also, the site randomly times out my requests (though the function actually gets performed, the browser just sits loading forever).

    I have also noticed some errors in your implementation code for PHP (and Perl as well). To begin, you are encoding the ampersand symbol in your URL when it should *NOT* be encoded since it is not data, but a variable separator in it’s intended use.

    I have made several fixes to your WordPress plugin as well – I’d like to give you the updated copy so just contact me on how I can do that.

  126. markcas says:

    also testing…

  127. Seb says:


  128. Pii says:

    Just a test

  129. Mat says:

    Well, since everyone is testing here, I might as well…

  130. A more technical question: Why do you use Amazon S3 to spread the images in the first place?

    Why not rent another server and let this be the host and source for the two on the front end and sync via rsync?

  131. H.A.L. says:

    Is this working?

  132. Kiere says:

    The blog seems to be online, but I went to the link it always times out with a 502 error. Anyone know anything about this?

  133. Roly says:

    Why this code not working??

    $email = “”;
    $default = “”;
    $size = 40;

    You can construct your gravatar url with the following php code:

    $grav_url = “

  134. png images definitely seem to be causing a problem. I uploaded a new avatar – linked it to my email – and the image has not changed in something like 3 days.

  135. Linda says:

    I changed my gravatar yesterday and it was switching back and forth between my old and new most of the day. Today I went in and deleted my old one from the file and now my new one is not showing up at all. Mostly I use it in Haloscan comments. Is there something I need to do to clear old cookies or temp files or something to get it to work properly?

  136. Hatem says:

    tesing again, seems nothing ? I have added my gravatar the first day the website launched maybe 😦 so long

  137. Guy says:

    Curious if my avatar does work here…

  138. JR says:

    Gravatars working but is returning a 503 since yesterday. Anyone know what’s up?

  139. Marie says:

    Testing my gravatar here too…

  140. balou says:

    Hello everyone 🙂

    On teste le gravatar hein ! Sorry, i am french because ?
    oui je me soigne …

  141. robin says:

    I couldn’t agree more. Thanks for arcticle.

  142. Test again says:


  143. Justest says:


  144. afddsfasdasdfasdfasdfasdfasdfasdf says:


  145. Ian says:

    And does this work?

  146. Ponzi says:

    @ Ian: Very good !

  147. Ian Quigley says:

    Please create a test page. I can’t get image link to work just yet. (Unless I post a comment here and look at the html source?)

  148. Wazungu says:

    Thanks for working on it – I’ll try the gravitar plugins now for my site. Have a good day!

  149. pierluigi says:

    test.. and thanks for this service!

  150. Shane says:

    I seem to still be having the wrong gravatar coming up – showing one that was deleted a day ago. If this is working then I should have a yellow background behind me.

    If it does work here – is there a known issue with the 2.62 Gravatars2 plugin for WordPress (


  151. Nicki says:

    Gravatar svcs down? I haven’t been able to get to anything on this site except this blog all day. 😛

  152. Name says:

    … and the fucking retard dies again.

  153. 가우리 says:

    Server Error –;

  154. Reid says:

    The main site is down, let alone svcs or subversion, or whatever. The server is saying:

    Service Temporarily Unavailable

    The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

    Additionally, a 503 Service Temporarily Unavailable error was encountered while trying to use an ErrorDocument to handle the request.

  155. thomasn528 says:

    testing, testing.

  156. baron says:

    are they back?

  157. nova says:

    not so much

  158. Gerald says:

    Doesn’t work for me … i’ve reapplied my avatar multiple times, still the old one is shown.

  159. seriously_black says:

    Interesting problem. Glad you found it. I hope that means that gravatars will start working again soon.

  160. Nat says:

    Works great for me, good work, love the new features!

  161. paikia says:

    testing again

  162. blackhat says:


  163. Elizabeth says:

    Hi, my gravatar doesn’t show anywhere, the email is good & it’s rated g.
    Any help would be great, thanks.

  164. i signed up and altered my site only to reverse the code ;( I found that my avatar was not showing properly, i am not sure what the case may be but at the URL
    it shows the gravatar logo

  165. Mike says:

    just testing. thanks for a great service 🙂

  166. Test says:

    Test 12345

  167. Jane says:


  168. LL says:

    Hope this got fixed.

  169. Thank you ..
    Known rebuilding.

  170. […] vom 3. März: Offensichtlich ist das Problem nun behoben, wie dieser Beitrag zeigt. Hoffentlich bleibt es […]

an    joint