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
Oscar Carvajal Mora
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.
oculorum
oculorum3w ago
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.
Tim van Heugten
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)?
Tim van Heugten
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
Oscar Carvajal Mora
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 🤔

Did you find this page helpful?