ui-avatars.com error?
Could anyone explain why this avatar doesn't work?
https://ui-avatars.com/api/?name=P+S&color=FFFFFF&background=oklch(0.141%200.005%20285.823)
Any other characters combinations works normal, only pair "P+S" doesn't work...
fox example:
https://ui-avatars.com/api/?name=P+R&color=FFFFFF&background=oklch(0.141%200.005%20285.823)
7 Replies
I have the same problem. Maybe it's worth sending 'hex' instead of 'oklch'.
Examples:
works: https://ui-avatars.com/api/?name=B+S&color=FFFFFF&background=oklch(0.141%200.005%20285.823)
fails: https://ui-avatars.com/api/?name=B+W&color=FFFFFF&background=oklch(0.141%200.005%20285.823)
In the docs says that it have to be a "Hex color for the image background, without the hash (#). Default: f0e9e9". BTW, in my case, when I try any of the URLs that @RafałMaślakMisterPoland provides, for me, "P+S" works. Try working only with HEX
Free API to generate avatars with initials - User Initial avatars
Generate image avatars with user initials for free, just specify name. No limits or registration.
Okay, but it's the Filament component that generates this URL from OKLCH. This is the default behavior of Filament. Of course, we can override this, but it's probably worth fixing.
What happens if you visit that url? For me it renders the avatar just fine. Maybe this was a temporary issue on their end (and it seemed random because their cache was still working, so some worked and some didn’t)?
Second one loads fine for me, first one doesn’t
Still think its an issue on their end with generation / caching / cdn usage
I see someone reported the issue to the creator on Github
Yep, I think the same. In the docs says that they don't store anything but cache responses. As @Tim van Heugten says, maybe a fail response was cached. For me, still being the same result: the first one works fine and only the second example fails. BTW, I think that if Filament is using
oklch
colors is not completely right just because the API docs says that it expects hex
colors 🤔