Images not rendered properly using a 'learnr' Rmd wrapped in an R-package

Please see the External Resources section in the learnr documentation. In short, you should place images in an images/ folder next to the tutorial source .Rmd and reference them in the document using ![](images/cat.png) or knitr::include_graphics("images/cat.png").

There are more details in my answer to this question When can I use a prefix created with `shiny::addResourcePath()` to access shared resources? - #2 by grrrck

Edit: I think the missing piece for you is just that the images/ folder needs to be in the same folder where the tutorial is stored. Oh, and please don't use here::here() since that makes the path absolute when it needs to be a relative path.)

2 Likes