98 karma · joined October 7, 2017
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
The reason its not CSS is because this api generates the initials for you.
CSS is way faster, so I’d recommend that
I don’t think theres anything to it
https://ui-avatars.com/api/?name=马云马云&length=4 Maybe this works?
Anyway, actually one could add &no-cache and it would ignore cache, I forgot that part
There's also this one: http://avatars.adorable.io
I think it's interesting how much thought goes into default avatars, and that it can be used as a marketing tactic. Thanks for providing link to Twitter as well. Guess I'll have to think more about it in the future.
Honestly? Nothing really. Well, you don't have to think about the code part but besides that? Nothing. Actually it would be more performant to use CSS and HTML (or SVG?) to generate avatars. I have a core package (used to generate the initials), and if used that with html, it would be far better.
I use the service for our internal products, as gravatar fallbacks
Also, I think theres a lot of those unique avatar generators out there (even one in the comments here), and I like them but they're not personal like your initials are. Also, for example, in accounting software (where I needed it internally) a monster or space invaders didn't fit with the audience.
I do however like your idea! Wouldn't be hard do create either. Who knows, that could be version 2
I guess generating them locally (or using CSS) would be the best option for anyone concerned with privacy
I absolutely see your point, that's also why I open-sourced the code (see footer), but obviously I could be using different code or track it on the server (nginx or similar?). This is not the case, but I understand. Another option is to use the core generator (which is also open sourced) so that the generation happens locally :) But then again, CSS+HTML does not require any generation
However due to caching, the request above will not work before tomorrow. You will have to input another name. I apologize.
I may clear the image cache later today just to fix any issues related to this.