I have added several gif files to an rmarkdown presentation (ioslides output). I would like to control the number of times it loops - the default behavior is endless repeat. Is this possible? I tried searching the rmarkdown documentation without much success.
I think you can use magick package to modify your original gif.
gif <- image_read("https://jeroen.github.io/images/banana.gif")
# this is the original gif
gif2 <- image_animate(gif, loop = 3)
# gif that will loop only two times
You have also so specific function gif that uses gifski