The chat ads that are shown in the side bar of site pages incorrectly expect the user to always have a gravatar-based profile image:

var e = "http://www.gravatar.com/avatar/" + b.emailhash + "?s=23&d=identicon&r=PG"

This is incorrect behaviour for users who have Facebook or direct-upload profile images. As Szabolcs points out in chat, this is a particular problem for Facebook images which have their own query string, as it breaks the size argument to gravatar:

oversized broken gravatar

The JavaScript should check if the provided user emailhash value is a URL, and use that in place of the constructed gravatar URL when appropriate.

For the related issue of the icon being allowed to be too large, the generated <img> tag should be constrained to height="23" width="23" just in case.

  • I don't disagree, but what do you mean check if the emailhash is a URL? Your var e shows the url for the image, where b.emailhash is the unique id (hashed email) for the user, s=23 is asking for a 23 pixel image and d=identicon is what specifies the default image if no img exists (like in this case). They could choose to return a 404 in the case of no img (and do something else)... but apparently aren't. Commented Jan 18, 2013 at 3:42
  • b.emailhash is an actual URL to the non-gravatar profile image in the above-mentioned cases, so you end up with http://www.gravatar.com/avatar/https://i.sstatic.net/ljxup.png?s=23&d=identicon&r=PG.
    – Tim Stone
    Commented Jan 18, 2013 at 3:51
  • OK that makes total sense... I've only worked with the actual hashed email for generating gravatar URLs. Wasn't aware of what b.emailhash came out as... seems like a misnomer. Commented Jan 18, 2013 at 3:53
  • @Richard only 50 points? The devs will just laugh at your face! ;) Commented Mar 5, 2013 at 15:31
  • @ShaWizDowArd I clicked too fast and didnt bother to change it. It they don't fix it before the bounty period is up ill re bounty for 200 Commented Mar 5, 2013 at 17:26
  • @Richard noble of you, but please let me. I have lots and honestly have no use of it over 20K... :-) Commented Mar 5, 2013 at 19:03

1 Answer 1


The direct-upload images will be handled correctly after the next build; the Facebook images will be handled almost correctly – we continue to make the assumption that avatars are square (this is guaranteed for gravatars and direct-upload avatars); for the rare case that a user has a non-square Facebook avatar, the image will appear stretched in the chat ad.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .