When the package README.md has an image, it's not copied to docs folder and then it's not rendered in the website.
Yeah I haven't figured out how that's going to work yet
How do you deal with the same problem on CRAN? (i.e. the readme gets rendered there too, and presumably it doesn't have the images either)
On CRAN, they use README.html which can contain inline images rendered as rendered by rmarkdown.
@jranke we're talking about README.md here
@hadley sorry, I confused it with my cgit setup
where I show README.html as the about page...
Yeah, it doesn't work too. https://cran.r-project.org/web/packages/rslp/README.html
Fixing the issue for CRAN would fix on staticdocs. Maybe it's not an staticdocs problem.
I think for now, you should solve it by linking to the full github url
Hadley's solution worked for me. For others: this is the URL containing "raw" that you get by navigating to the image on GitHub, then using the link associated with the "Download" button.
E.g., https://github.com/username/packagename/raw/master/tools/readme/imagename.PNG
I think current advice is to put images in man/figures - that way CRAN can access too.
Ah, thanks - that is better and it worked.
For future readers, https://github.com/r-lib/pkgdown/issues/280 is a newer reference on this - the images in man/figures will get copied to reference/figures so you can link to that relative filepath from a custom Index.Rmd file.