0

I want to show a gif (that I created using gifski) in a r-markdown html-report.

I have read several related questions on this topic and learned that this is the prefered method:

```{r, echo=FALSE, out.width = '100%'}
knitr::include_graphics("animation.gif", error = FALSE)
```

Therefore (and because other methods don't work any better) I'm using this method. My problem is, that this doesn't always work. Sometimes is works as expected and sometimes (most often) it doesn't show the gif. (It doen't show anything then, not a bad image box or something - nothing.)

If I try with an otherwise empty notebook, it works.

I also tried these methods:

![](animation.gif)

and

<img src="animation.gif"/>

The gif is in the same folder as the .Rmd
It doesn't help, if I add a \ before the path.

Thank you for your advice.

Mika2019
  • 47
  • 9
  • I would first check if its not related to this [Animated gif only loops once in Chrome and Firefox](https://stackoverflow.com/a/38082881/2521214) and the GIF has just blank last frame ... – Spektre Jan 06 '23 at 09:17

1 Answers1

0

I found out, that it seems to be a problem with firefox.
With chrome the animation is fine.
I don't know what the problem is, though.

Mika2019
  • 47
  • 9
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jan 05 '23 at 20:15