Make it so gifs play when you embed them
Posted under /swa2/
Bill said:
Make it so gifs play when you embed them
This is one of those rare times I got a straight answer inside of #technical, and (only) from the owner of Danbooru himself. The embeds use a specialized "sample" variant saved as a webp file to save space rendering a great variety of images on one page multiple times and to maintain decent quality. With how GIFs currently work on the site, you would have to call the original item, costing a great amount of time rendering each page since modern GIFs can be costly. If I fix that quirk, that could open an easy avenue for DoS attacks from the usual suspects, spamming pages of multiple 50mb GIFs and making the site slow and terrible to navigate and manage.
This COULD be an issue I can tackle in the future, as I could create an alternative variant just for storing bite-sized, compressed GIFs to use for that purpose. I would likely have to add some Javascript fetch logic on a button next to the element as well to save on load space. As I'm looking at that right now, it's a function I'd have to research more into before implementing it.
TeeThingus_Bonemantics said:
This is one of those rare times I got a straight answer inside of #technical, and (only) from the owner of Danbooru himself. The embeds use a specialized "sample" variant saved as a webp file to save space rendering a great variety of images on one page multiple times and to maintain decent quality. With how GIFs currently work on the site, you would have to call the original item, costing a great amount of time rendering each page since modern GIFs can be costly. If I fix that quirk, that could open an easy avenue for DoS attacks from the usual suspects, spamming pages of multiple 50mb GIFs and making the site slow and terrible to navigate and manage.
This COULD be an issue I can tackle in the future, as I could create an alternative variant just for storing bite-sized, compressed GIFs to use for that purpose. I would likely have to add some Javascript fetch logic on a button next to the element as well to save on load space. As I'm looking at that right now, it's a function I'd have to research more into before implementing it.
I see....