You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.The text was updated successfully, but these errors were encountered: