# Improved “letter avatar” generation

**URL:** <https://meta.discourse.org/t/improved-letter-avatar-generation/86325>\
**Category:** Feature\
**Created:** [27 באפריל,‏ 2018,‏ 6:08pm UTC](https://meta.discourse.org/t/improved-letter-avatar-generation/86325 "2018-04-27T18:08:32Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![ChrisBeach](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chrisbeach/32/214628_2.png) [@ChrisBeach](https://meta.discourse.org/u/ChrisBeach)\
**Post date:** [27 באפריל,‏ 2018,‏ 6:08pm UTC](https://meta.discourse.org/t/improved-letter-avatar-generation/86325/1 "2018-04-27T18:08:32Z")

</div>

Saw this on another forum, thought the shadow looked quite nice and wondered if it might be an easy addition to the code that generates default avatars for Discourse users?

 ![image](https://global.discourse-cdn.com/meta/original/3X/a/7/a769040ca36db5a317d0967f537f93ab5009ce6e.jpeg)

---

<div class="post-metadata">

**Author:** ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)\
**Post date:** [27 באפריל,‏ 2018,‏ 7:20pm UTC](https://meta.discourse.org/t/improved-letter-avatar-generation/86325/2 "2018-04-27T19:20:12Z")

</div>

That’s a custom avatar - you can see the actual letter avatar at the top of the screenshot.

---

<div class="post-metadata">

**Author:** ![ChrisBeach](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chrisbeach/32/214628_2.png) [@ChrisBeach](https://meta.discourse.org/u/ChrisBeach)\
**Post date:** [27 באפריל,‏ 2018,‏ 7:21pm UTC](https://meta.discourse.org/t/improved-letter-avatar-generation/86325/3 "2018-04-27T19:21:14Z")

</div>

> [@riking](#):
>
> That’s a custom avatar - you can see the actual letter avatar at the top of the screenshot.

Yes - I know. I’m proposing a change to the code that generates letter avatars (to add the shadow that was manually added to this custom avatar)

---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
**Post date:** [27 באפריל,‏ 2018,‏ 8:33pm UTC](https://meta.discourse.org/t/improved-letter-avatar-generation/86325/4 "2018-04-27T20:33:35Z")

</div>

It’s a style thing, so it’d need to be a plugin local to that site.

---

<div class="post-metadata">

**Author:** ![ChrisBeach](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chrisbeach/32/214628_2.png) [@ChrisBeach](https://meta.discourse.org/u/ChrisBeach)\
**Post date:** [27 באפריל,‏ 2018,‏ 8:35pm UTC](https://meta.discourse.org/t/improved-letter-avatar-generation/86325/5 "2018-04-27T20:35:39Z")

</div>

> [@codinghorror](#):
>
> It’s a style thing, so it’d need to be a plugin local to that site.

With respect, is the core Discourse style not open to the occasional design tweak?

---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
**Post date:** [27 באפריל,‏ 2018,‏ 8:39pm UTC](https://meta.discourse.org/t/improved-letter-avatar-generation/86325/6 "2018-04-27T20:39:11Z")

</div>

Maybe, but I think that’s a fairly radical departure from what we have, going from flat to non-flat.

---

<div class="post-metadata">

**Author:** ![notriddle](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/notriddle/32/133055_2.png) [@notriddle](https://meta.discourse.org/u/notriddle)\
**Post date:** [27 באפריל,‏ 2018,‏ 10:55pm UTC](https://meta.discourse.org/t/improved-letter-avatar-generation/86325/7 "2018-04-27T22:55:47Z")

</div>

You don’t actually need to patch Discourse. You go into the admin settings area and change the `external system avatars url` setting to point at your own web service that generates the avatars in whatever style you want.

Patch this thing: [GitHub - discourse/letter-avatars: Teeny tiny web service to generate letter-based avatars · GitHub](https://github.com/discourse/letter-avatars)

---

<div class="post-metadata">

**Author:** ![ChrisBeach](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chrisbeach/32/214628_2.png) [@ChrisBeach](https://meta.discourse.org/u/ChrisBeach)\
**Post date:** [27 באפריל,‏ 2018,‏ 10:56pm UTC](https://meta.discourse.org/t/improved-letter-avatar-generation/86325/8 "2018-04-27T22:56:38Z")

</div>

Brilliant, @notriddle - exactly what I was hoping for 👍

---

<div class="post-metadata">

**Author:** ![erlend\_sh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/erlend_sh/32/119475_2.png) [@erlend\_sh](https://meta.discourse.org/u/erlend_sh)\
**Post date:** [29 באפריל,‏ 2018,‏ 1:47am UTC](https://meta.discourse.org/t/improved-letter-avatar-generation/86325/9 "2018-04-29T01:47:47Z")

</div>

If you end up making your own version of letter generation @ChrisBeach we’d love to hear about it. It’d make for a great tutorial, and longer term it would be pretty cool to have a modular avatar generator that lets you choose between different styles and algorithms.

---

<div class="post-metadata">

**Author:** ![mpalmer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mpalmer/32/45740_2.png) [@mpalmer](https://meta.discourse.org/u/mpalmer)\
**Post date:** [29 באפריל,‏ 2018,‏ 2:16am UTC](https://meta.discourse.org/t/improved-letter-avatar-generation/86325/10 "2018-04-29T02:16:50Z")

</div>

We do already have a modular avatar generator; the letter-avatars service is quite capable of providing differently styled avatars if you hit a different base URL. I’d be happy to review a PR that added a separate `/drop-shadows` endpoint that people could point their `external system avatars url` at. There’s a reasonable chance we’d even expose it on the CDN-backed `avatars.discourse.org` service (the default external avatars service). Gotta get the code written first, though, and as a veteran of the “why the f\*&$%%k isn’t this centered” wars of 2015 and 2016, it is not as trivial as it might at first appear.

---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
**Post date:** [29 באפריל,‏ 2018,‏ 2:47am UTC](https://meta.discourse.org/t/improved-letter-avatar-generation/86325/11 "2018-04-29T02:47:14Z")

</div>

Typography is tougher than it looks!

---

<div class="post-metadata">

**Author:** ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)\
**Post date:** [29 באפריל,‏ 2018,‏ 4:44am UTC](https://meta.discourse.org/t/improved-letter-avatar-generation/86325/12 "2018-04-29T04:44:51Z")

</div>

![image](https://global.discourse-cdn.com/meta/original/3X/4/8/487f01449a074f5845fc6f13ab70c72344836a92.jpeg)

So true
