Also, how heavy filesize (mb) wise are those gifs? I'm trying to see in the code if there are some kind of optimizations I could do that would make it work better with particularly heavy gifs if they happen to be cause of lag.
The 1393 gifs I tried are all 400x400px in resolution, roughly 1-6mb in filesize, but I also tried a folder with 121 gifs that were 800x700px/1-6mb in size and those ran fairly smooth in both firefox and brave browser.