That Codepen sample plays such GIFs by default unless user's browser preference is set for reduced motion (see the JS in the sample), but by not setting the 'open' attribute on the details tag (line 5 of the HTML in the sample) it could always start paused.
The technique relies on having a static image containing one frame of the animated GIF, so that would need to be done server-side when an animated GIF is uploaded.
May 11, 2023
Thank you for submitting the idea. The status has been changed to "Future consideration".