discordjs / discord.js

A powerful JavaScript library for interacting with the Discord API
https://discord.js.org
Apache License 2.0
25.36k stars 3.97k forks source link

Option for ImageURLOptions to have support for <any image format> else GIF if animated. #2689

Closed axc450 closed 6 years ago

axc450 commented 6 years ago

Is your feature request related to a problem? Please describe. Nope

Describe the solution you'd like There are different image options available for ImageURLOptions, each with their own pros and cons: .webp only seems to be supported by chrome .png/.jpg does not support animation .gif doesnt support transparency.

I ideally was looking for a "GIF if animated else PNG" as this will allow transparency with static images and animation if not, supported across all browsers. This feature would allow you to choose "-image format- if not animated else GIF" rather then the default WEBP.

Describe alternatives you've considered I am just using one of the current options for now

Additional context

amishshah commented 6 years ago

This doesn't seem like we should add to Discord.js as it's not a core feature. It would add a lot of bloat for us to check if images are animated.