riolubruh/YABDP4Nitro

Custom PFP animates without hover/speaking which is not in line with how it normally works

Closed this issue · 2 comments

My friend says the plugin shows their animated avatar, but avatar is animating always in voice chat, this feature must like work when people speaks or user moves pointer in voice chat to user who have animated PFP.

Great suggestion, but unfortunately, I don't think it's possible* due to limitations of Imgur.

Explanation:
The way Discord achieves this effect is by storing multiple different versions of avatars in different formats. It switches between them on the fly, and the API is equipped to handle it, providing non-animated webps, gifs, pngs, etc.
(Seems the client will switch between webp and gif formats on the fly, although technically they could keep using webp if the "animated=true" flag was appended to the URL, since WEBPs do support animation, but the api will provide a non-animated version by default.)
Imgur, however, only stores the GIF version of GIFs, there is no other version of the file we can switch to to stop the animation.

 
* - technically, it would be theoretically possible to convert GIFs to image data within JS, but the performance of performing that action constantly would be nightmareish, and we really can't afford to tank performance since BD performance is bad as it is.

If we ever decide switch providers, I will try to consider this.