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

Default avatar not working #689

Closed
Glennmen opened this issue Sep 14, 2022 · 0 comments · Fixed by #691
Closed

Default avatar not working #689

Glennmen opened this issue Sep 14, 2022 · 0 comments · Fixed by #691

Comments

@Glennmen
Copy link

When the user hasn't set a default avatar and you are trying to get their default discord avatar using member.defaultAvatar this returns an invalid URL.

Root cause: PR #401
This PR converted from by default using PNG for all avatars to default using WEBP. This is a good change in general and should remain like this for custom avatars.

But for some reason Discord decided not to make WEBP variants for their default avatars, as shown here:
https://discord.com/developers/docs/reference#image-formatting-cdn-endpoints

Solution:
For defaultAvatar an exception has to be made so that it always returns PNG.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant