You can use a11y-gif-player web component to make sure the user can control GIF playback. Here’s how:

The image on the top or when slider is moved all the way to the right is the Matterhorn on a cloudy day without snow. As you move the slider to the left, the image below it reveals the Matterhorn on a clear day with snow.

<a11y-gif-player src="https://media0.giphy.com/media/zHaPZZvl6cVHi/giphy.gif" src-without-animation="https://media0.giphy.com/media/zHaPZZvl6cVHi/480w_s.jpg" alt="It's Always Sunny in Philadelphia Pepe Silvia Meme with GIFs" longdesc="Pepe Silvia scene from It's Always Sunny in Philadelphia. Jesus, dude, you're still making GIFs. The GIF's don't stop." style="max-width:400px;">
</a11y-gif-player>

Learn more about how to customize it at https://webcomponents.psu.edu.