Error: Unsupported MIME type: image/webp
Trying to do image manipulation with peoples avatars but it's throwing this when a static image of someones avatar is being displayed. When someone has a GIF as their avatar, it comes up but it's as a static image instead of actually a GIF.
8 Replies
• What's your exact discord.js
npm list discord.js
and node node -v
version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.Here's an example of a
/avatar blur
subcommand.
DIG is :
tl dr - how does one grab someones gif/image avatar
ping me pls when you respondYour initial code for getting avatar urls is fine
If the problem is specific to the file type of the avatars, you can pass in
{ extension: 'png' }
into avatarURL()
to force the extension to be a png, or you can also provide jpg/webp/gif extensions if those workThanks - Ideally i'd like to accept jpg/png/gif at once, is this possible?
By default, that's what the method does
I assujme the actual problem stems from your DIG package, but I don't know enough about how it works to provide a better solution
It's the webp file that it's having issues with, how would I force it to only use png/jpg/gif?
it usually happens with static avatars
if that's not possible, I guess I could try converting it from webp
It looks like if you specify gif, it won't work with people who have nonanimated avatars
Specifying just png or just jpg should work fine for everyone, assuming you're ok with animated avatars becoming static
Not really
Just searched around and it seems the package just isn't compatible with gif's
thanks for your help