Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gravatar gives 404 #251

Open
pointlevel opened this issue Aug 12, 2022 · 1 comment
Open

Gravatar gives 404 #251

pointlevel opened this issue Aug 12, 2022 · 1 comment
Assignees
Labels

Comments

@pointlevel
Copy link

Hi,

When i use this component and check the network-tab in dev-tools, a created request to https://secure.gravatar.com/avatar/1f9d9a9efcf523b09629444632b5c?d=404&s=60 gives a 404.

@JorgenEvens
Copy link
Member

This happens when you supply an e-mailaddress to the Avatar component. It will automatically attempt to find an Avatar for that user using the Gravatar service. If non exists Gravatar will return a 404.

This 404 is cached in localStorage, so it should not occur every time the same avatar is loaded. If you find the cache not aggressive enough you can check out how to configure the cache or build your own here: https://github.com/ambassify/react-avatar/tree/9e9c0a0d4a5f14b93933087e00fa84c101f16a0b#cache

Alternatively you can supply the sources you would like to support to your component as discussed here: https://github.com/ambassify/react-avatar/tree/9e9c0a0d4a5f14b93933087e00fa84c101f16a0b#transpiled-es5-javascript--commonjs

@JorgenEvens JorgenEvens self-assigned this Aug 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants