Default avatar not working
Glennmen opened this issue · 0 comments
Glennmen commented
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.