Avatar Subsystem redesign

I just deployed the implementation of

It is a rather massive change to the way Discourse deals with avatars. We no longer include direct links to gravatar, so for example, this is no longer a concern on Discourse.


Additionally instead of displaying the impersonal squigly identihash we have nice looking letters.

The implementation is also a big perf boon as we no longer need to check avatars every 10 minutes with gravatar (which is a huge privacy leak imo)

Avatars are cached permanently.


Turns out our docker image is running an old version of image magick, will update the base image in the next week or so, but in the mean time I adjusted my usage. Deploying shortly.

Looks much cleaner, but shouldn’t HTML/CSS or SVG have been used instead of creating images for every user?
I think using SVG would have saved much storage space and added more flexibility to avatar creation.

One zero storage example I can think of is where colors are randomly selected taking user’s username as seed in a RNG, and then extracting the user’s name’s first letter from the DB (shouldn’t be expensive since names are already displayed wherever there are avatars), and then inserting it in a SVG template.
Since SVG images can also be cached, this shouldn’t put much load on servers, while saving precious storage space and adding flexibility to change all avatars in one go if need be.

1 Like

No very against that for 2 reasons

  1. It is hostile to embedding (like @codinghorror has on his blog)
  2. It complicates stuff. Now avatars are dead simple… /user_avtar/sam/{size}/{upload_id}.png no special code, easy to explain, no complex branch logic.

I love the fact that on an active forum without many custom avatars (like Soylent), the topic listing has a very real chance of spelling out rude words. This makes me giggle with childish glee :smiley:


There’s even some abuse potential for creative miscreants, and there’s currently no tool to fix this short of removing inoffensive, on-topic posts for no reason other then that the users’ default avatars “just so happened” to spell out some four letter word… :confused:

This is so theoretical. And posting in the topic will mess up the order, as posters get promoted to “most frequent” status and last poster changes all the time.

It’s also trivial to rename users in about 3 clicks if they insist on doing this.

I appreciate the concern, but it’s imagineering a bit.

1 Like

Yeah, I guess I’ve just had too many bad experiences with forums full of 14 year olds… good thing that my WoW days are far, far behind me, altho it sticks to you… it really does. :laughing:

I think the current extra-mega-bold font is not a good idea. It is very readable (and definitely better than Gravatar for many technical and visual reasons), but veers too far on the side of being large, so to my eye it looks childish and whimsical :

I think a thinner, more whitespace friendly design (maybe not quite this thin, but not much fatter) would look a lot better:

(Stolen from the Android default color name blocks. Imagine those in different colors, too…)

1 Like

I like [Asana][1]'s implementation:

Specifically, smallish thickish type with a lot of room to breathe within the square.
[1]: http://asana.com

1 Like

I’m tellin ya. Proxima Nova or Century Gothic. Dat’s where it’s at, yo.


Nooo, it must be Comic Sans! *ducks*




The new thinner version is rolling out now. Here it is for comparison with the older thicker one:

Much, much better to my eye!


I like this though my personal opinion is there should be more room within the square, like this:

The above is Proxima Nova Bold with a subtle shadow/dark glow.


After spending a couple of days getting used to this change, I still feel like the letter-avatars could look better. IMO most of the early mockups looked better than what we have currently. I think it’s that little bit of border that doesn’t feel right.


No border:

(Using PT Mono. Dunno if that’s the font in use but it seemed pretty close).

Anyone else feel the same way? (edit: pic fix)


I really like the border and am a die hard fan of helvetica, but also think we should probably make this stuff pluggable, so you can have your own fonts and algorithm for your own site.

1 Like

+1000 to making it pluggable. Was just about to make a post about it. There is huge potential for bikeshed discussion here, for which ‘user’s choice’ is often a great remedy. I’d absolutely love a simple Avatars Customizer plugin that works in similar fashion to the new themer system.

Just changing up the avatar styling can go a long way to personalising your forum and making it feel less “mass produced”.

1 Like

I am not a fan of the border at large sizes but I do feel it helps legibility at the small sizes. So for me, it depends.

Well done with the new Default Avatars, looks fantastic! Much cleaner than the previous kaleidoscopes.

The risk of a rude word popping up adds a certain edginess to my accountancy forum :stuck_out_tongue: