• jscooper

    (@jscooper)


    Is there a setting or some code to make animated GIFs not play unless clicked? There was a plugin that did it but the author removed it months ago.

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    The usual way GIFs manage click to play and looping is within the file’s attributes. They are set when the GIF is being edited. Writing code to alter file attributes would be a very poor approach.

    What that plugin may have done is extract a single frame from the GIF, which can be used as a static overlay thumbnail for the GIF. Clicking it causes the overlay to become transparent, allowing the actual GIF below to show through. The problem here would be the GIF could be in any place in its loop when clicked, it doesn’t start from the beginning. You could initially only load the static image, deferring GIF load until the static image is clicked. Depending on GIF size and connection speed, this may not work very well.

    More thoughts on the topic: https://stackoverflow.com/questions/5818003/stop-a-gif-animation-onload-on-mouseover-start-the-activation

Viewing 1 replies (of 1 total)

The topic ‘Disable GIF Autoplay’ is closed to new replies.