uploaded gifs fail to loop in chat on firefox

(#676) Bug Fixed media

Thread

Comment by @Solly-Bird
RexSystem 1 vote originally by @Solly-Bird on GitHub
It has to do with the image.close() line here. It calls .close() on the VideoFrame object after each loop through the GIF, so by the time it passes through the second time, there's nothing to render. Commenting out that image.close() line solves the issue on Firefox. I'm not sure why this happens on Firefox but not Chrome. I'm also not sure of the memory usage implications for this change, so I'll leave it to someone that knows frontend JS better than I do