Custom Local Avatars

Jeff Atwood August 29, 2013

One of the most requested features in the last few months is easily custom avatars. Although Discourse has always supported standard Internet-wide Gravatars based on the account email address, there were some long-standing concerns:

  • Some people simply don’t like Gravatar, for whatever reason, though as a WordPress company they are (at least in my opinion) one of the more ethical and responsible choices.
  • Gravatars may not function inside corporate firewalls as they have to reach out to an external public website to generate the avatar images.
  • Gravatar very recently changed their signup process so it is a bit more work; you have to have a WordPress account. One of the core Gravatar developers was kind enough to stop by our forum and explain the rationale for this change.
  • There are concerns about reversing the email hash used to generate the Gravatar and harvesting emails. (You can mitigate this by using plus email addressing if you are concerned, e.g.
  • It is another third party dependency required for your forum to work, for better or worse.

With all that community feedback in mind, we began to prioritize local avatar support, and I’m happy to announce that local avatar support is now here, tested, and will be enabled by default in the next numbered release!

Once enabled, you’ll see a slightly different edit button on your user preferences next to your avatar:


Selecting edit brings you to a dialog where you can select either the default Gravatar based on your email address, or a completely custom avatar of your choice.


Once you upload an avatar, you are free to switch back and forth at will, or change your custom avatar at any time.


A few caveats:

  • Avatars must be square, and we’ll show a warning if we have to auto-square the uploaded image.
  • Animated GIF avatars are (thankfully) disabled by default, but if you hate yourself and your discussion community, you can optionally enable them … but if you do this, I want you to know that you are a bad person and you should feel bad. I’m just saying.

We continue to love Gravatar as an open web service that makes it easier for people to “automagically” have avatars on every website they visit with no effort at all — but Discourse is a rainbow system of many options and you should be able to configure it exactly how you want.

We hope you enjoy your new custom local avatar option!

Notable Replies

  1. This is an outrage!

    (on second thought, I see your point…)

  2. Have you thought about adding support for one of the new(ish) distributed avatar protocols? Such as Libravatar or Pavatar?

  3. Thanks for bringing those to my attention.

    Pavatar looks pretty dead. The page has a date of 2006 for the “latest spec”, and the latest post on their support forum is from 2008! And I’ve never heard of it until now. This does not bode well.

    As for Libravatar, it says:

    How is Libravatar different from Gravatar though? The main difference is that while is an online avatar hosting service just like Gravatar, the software that powers the former is also available for download under a free software license.

    Why would you want to run your own instance? Our belief is that centralised approaches don’t put users in control. If you own your own domain name, you control how mail is delivered to your domain. You should also be able to control how avatars are served to other websites.

    For example, if you own a business, you may want to integrate with existing systems (e.g. a staff directory) and delegate authentication to what you’re already using (LDAP?). Plus, you can choose what happens when email addresses are not found (display your company logo?).

    So this is an additional layer of complexity. Rather than Discourse being the single point of truth for avatars, there’s another service you install alongside it which is…

    I dunno, I think merely serving avatars is not that useful of a service to run, the difficulty of spinning it up is not worth what it provides to you versus Gravatar.

  4. Speaking of pavatar. Here’s the reason it was rejected from’s registry of rel values.
    [uf-discuss] rel="pavatar"

    I don’t completely agree with the rationale for rejection (hCard makes me want to vomit) but it does make you think that some other standards out there could be used to support turning personal urls into avatar sources besides depending on Gravatar.

  5. I should point out that the Mozilla developer who had a lot to do with Mozilla Persona, Francois Marier, is also the main developer behind Libravatar… so, given that association, it seems fitting to at least allow the option of Libravatar in Discourse :smile:

  6. Avatar for sam sam says:

    Keep in mind, our implementation of gravatar is very secure and private. Unlike the vast amount of implementations in the wild.

    We cache all images on the server, users have to opt-in to update avatar from gravatar.

    This means gravatar is not getting any information about browsing habits and other nasty analytics every 5 minutes.

Continue the discussion

4 more replies