HN user

lasserafn

98 karma

just building random stuff for free

Posts8
Comments38
View on HN
Tweet.new 2 years ago

loving this, and we should all do more stuff because 'its funny' - would make the world a better place

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

In regard to latest edit with Twitter

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.

Thanks you!

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

I built this service (or, the core GitHub package) because we needed it internally, and someone requested an API of this, so I quickly threw together this :-).

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

Solid points :D Sadly theres not much I can do (I think?) to make people believe that there is privacy.

I guess generating them locally (or using CSS) would be the best option for anyone concerned with privacy

Absolutely, I'd probably also just use CSS and HTML and use the core package: https://github.com/lasserafn/php-initials to generate the initials, it's faster and you won't depend on third-party.

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

Chinese support has been added, good catch! I actually thought I had it covered.

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.