0

How do I convert the avatar URL to .png?

Error: Unsupported MIME type: image/webp
    at Jimp.throwError (/rbd/pnpm-volume/d0d23ade-48c6-41ba-b84e-4a28aa8daecb/node_modules/.registry.npmjs.org/@jimp/utils/0.14.0/node_modules/@jimp/utils/dist/index.js:33:13)
vizsatiz
  • 1,933
  • 1
  • 17
  • 36

2 Answers2

3

If you're using displayAvatarURL() or avatarURL(), you can set the format to png. That way, you'll get a PNG image instead of webp. As an example:

user.displayAvatarURL();
// would become
user.displayAvatarURL({ format: 'png' });
Costpap
  • 48
  • 6
0

The error shows that image type webp is not supported

You can know more about webp here

Try using this package to convert webp.

Run the following commands

sidrao2006
  • 1,228
  • 2
  • 10
  • 32