The only thing I can see is the gravatar callback (which incidentally has to use a different endpoint anyway to work-around gravatar not supporting query params) - is that not as niche of a use as it seemed to me?
Probably because you don't have to have different css styles for many of the options like image size, font size, language, color. Though these can be achieved with css.
One use case I see is for native mobile apps to generate the avatars as an initial profile image during the signup.
Absolutely, but it’s not that simpel, it’s made to be flexible and handle different logic. Not that it’s magic by any means, it’s fairly simple but you’d want to generate the initials on the server anyway, to acomplish similar results
For example, it takes first letter of first name, and 2 letters from last name if only two names supplied and desired length is 3.
However if 3 names are supplied, it uses a letter from each name.
It’s not magic, but doing it in CSS wouldn’t be easy, I imagine
Comments
I don't understand why one would prefer an API to a CSS for this?
I'm not even saying don't add the dependency - why should this project be an API instead of some CSS that I load, and then write:
The only thing I can see is the gravatar callback (which incidentally has to use a different endpoint anyway to work-around gravatar not supporting query params) - is that not as niche of a use as it seemed to me?Probably because you don't have to have different css styles for many of the options like image size, font size, language, color. Though these can be achieved with css.
One use case I see is for native mobile apps to generate the avatars as an initial profile image during the signup.
It’s made to be a gravatar fallback :)
The reason its not CSS is because this api generates the initials for you.
CSS is way faster, so I’d recommend that
It's been a while since I've written any CSS, but I'm pretty sure you can select first letters? Useful for drop caps, for example.
Absolutely, but it’s not that simpel, it’s made to be flexible and handle different logic. Not that it’s magic by any means, it’s fairly simple but you’d want to generate the initials on the server anyway, to acomplish similar results
For example, it takes first letter of first name, and 2 letters from last name if only two names supplied and desired length is 3.
However if 3 names are supplied, it uses a letter from each name.
It’s not magic, but doing it in CSS wouldn’t be easy, I imagine