Closed konradmoesch closed 1 month ago
I think this can be fixed by improving authentik/lib/avatars.py. . The mode_url
could be improved to work similar to mode_gravatar
(check for 404, cache result and return None if needed).
This seems like a pretty simple change. If I find time to set up a dev env, I might try it myself.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Still relevant, pr is still open. Could someone reopen this? Thanks
Describe the bug I have configured libravatar as custom avatar source, gravatar and initials as fallback. The config line looks like this:
https://seccdn.libravatar.org/avatar/%(mail_hash)s?d=404,gravatar,initials
If no libravatar is found (404 returned), no fallback to gravatar or initials is done. Instead, the "error image" is shown (see screenshot below)
To Reproduce Steps to reproduce the behavior:
/if/user
or bottom left corner of/if/admin
Expected behavior On a 404 (or maybe even any other error code), the next available fallback should be shown
Screenshots I would expect "TU" as initials in this case.
Version and Deployment:
Additional context The url loaded in my example (testuser without a mail address) is https://seccdn.libravatar.org/avatar/d41d8cd98f00b204e9800998ecf8427e?d=404, which returns a 404