# Generate Letter Icon from Name instead of Username?

**URL:** <https://meta.discourse.org/t/generate-letter-icon-from-name-instead-of-username/64167>\
**Category:** Development\
**Created:** [8. Juni 2017 um 16:30 UTC](https://meta.discourse.org/t/generate-letter-icon-from-name-instead-of-username/64167 "2017-06-08T16:30:33Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [8. Juni 2017 um 16:30 UTC](https://meta.discourse.org/t/generate-letter-icon-from-name-instead-of-username/64167/1 "2017-06-08T16:30:33Z")

</div>

I’m doing an import and all of the usernames are integers. Most users have avatars, but those that don’t end up with something like ![](https://global.discourse-cdn.com/meta/original/3X/c/0/c0448394c86bf9de74b789ee08649c76bf299af2.png) as their avatar.

Is there some way to have them generated by their name rather than username?

Perhaps the importer can call `LetterAvatar::Identity.generate(name, SOME_SIZE)`?

---

_[View the full topic](https://meta.discourse.org/t/generate-letter-icon-from-name-instead-of-username/64167)._
