Say I have a markdown file with the following gif:

Using pandoc, I can convert that .md file into a self-contained HTML file by running
pandoc smile.md -o smile.html --self-contained
When opened, the resulting HTML file immediately starts playing the image. However, I would like the image only to be played when the user clicks on it. Is there a way to insert this feature somewhere in the process above, either in the md file or in the pandoc call?
I have done some searching and read something about using HTML tags to insert the image and JS to create the controls (if I understood correctly), but I couldn't make it work in my simple example and it actually sounded like more work than it should.
The easiest way would be to use the mp4 of that video instead of the gif, like so:
Newer pandoc versions insert this as a
<video>
element with all the default controls available to the user.