I have a bookdown project that used to build just fine, but after updating everything (R Studio, R, bookdown, etc) this afternoon, it stopped working. I also tried updating to the dev package of bookdown, but it still doesn't work.
The problem is that an image cannot be found, no matter what I try with the path. It is embedded via knitr by a child Rmd file. If I put this in my index.Rmd, it works no problem:
```{r, echo=FALSE, fig.align='center', out.width='50%'}
knitr::include_graphics("basic-test/images/am_I_crazy.png")
```
But if I try to include that same image in a child rmd file, it stops working. Here's the replacement line in index.Rmd:
```{r, child='basic-test/rmds/classics-cover-page.Rmd'}
```
And here's the entire contents of classics-cover-page.Rmd:
```{r, echo=FALSE, fig.align='center', out.width='50%'}
knitr::include_graphics("../images/am_I_crazy.png")
```
Building the website doesn't throw an error, but the image is not found when you view the site. Building the epub throws the following error:
[WARNING] Could not fetch resource '../images/am_I_crazy.png': PandocResourceNotFound "../images/am_I_crazy.png"
Building the PDF throws the following error:
! LaTeX Error: File `../images/am_I_crazy' not found.
I'm pretty sure that's the right path, because it used to work, and because otherwise I get an error right away from knitr that it can't find the image. I've tried a bunch of other path combos anyway, but nothing is working. If I've just missed the right path, please let me know how I should reference that image file.
Otherwise, I suspect it's a bug introduced in knitr, since it is finding the image, but then not passing the correct path on to the next stage in the process. Does that seem like a reasonable conclusion? Should I file a bug with knitr?
P.S. I have an example project with this problem on Github that is simply the bookdown demo book with the additions mentioned above.