go-gitea / gitea

Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD
https://gitea.com
MIT License
44.61k stars 5.45k forks source link

Automatically generate avatars based on initials #6400

Open kolaente opened 5 years ago

kolaente commented 5 years ago

From the discussion on discourd, it would be nice if there was a way to let Gitea generate avatars for profiles based on the label like this one: image

Possible ways to solve this:

https://stackoverflow.com/questions/38299930/how-to-add-a-simple-text-label-to-an-image-in-go https://github.com/holys/initials-avatar

cc @mrsdizzie

techknowlogick commented 5 years ago

If we are thinking of adding new options to create different avatars I've actually ported a few avatar generation libs to golang that could also be used as well (perhaps in config there would be a setting to choose from a list of libraries for default avatars):

mrsdizzie commented 5 years ago

An initials based one would be a good/better default for now if you have a preferred existing library to use. I think adding a more solid default first and then focus on providing alternative options would be good and happy to help with that if necessary

kolaente commented 5 years ago

@mrsdizzie yes, but maybe it's a good idea to implement it in a way so we can extend it easily afterwards.

0x5c commented 5 years ago

As a user, that does happen to prefer the current behaviour, this definitely needs to be configurable. I can definitely see why one would prefer avatars based on initials though.