Add image_format or is_animated field to helix Emote endpoints
With the addition of animated emotes there is no way to tell from the emote API responses of GetChannelEmotes and GetEmoteSets if a new emote ( id starting with "emotesv2_") is a normal emote or an animated gif emote without downloading it and checking the file contents.
Would be nice to have either a "format" field that tells you "png" or "gif", or at least a "is_animated" bool field for each emote.
Use cases: Whenever you wanna show emote stats or emote info for a channel (like in a chat clients or stats website or emote panel) you often wanna count and display animated sets separately but currently the only way to tell is to actually download the /v2/ files and check the type.
We will be updating the documentation to make it clearer that the image in the payload will always be a static image. We are also planning to document the URL schema for the CDN to retrieve the animated version.
-
Canla commented
To clarify, I understand that the /v1/ and /v2/{emote_id}/static/ CDN urls are always static pngs for all emote ids, but the currently undocumented /v2/{emote_id}/default/ CDN urls you mention for the animated ones can either return pngs or gifs for emotesv2_ emotes depending on the emote without any way to tell beforehand from the API responses what type any emote with a emotesv2_whatever id will be without downloading it.
examples from dansgaming:
https://static-cdn.jtvnw.net/emoticons/v2/emotesv2_5dc74153d9bb4a13a7f6d8b37f318258/default/light/3.0
both emotesv2_ ids, one is a gif, one is a png. From the API alone you can't tell what type it will be.