My file tree looks like this:
--forecast
----report
------forecast.rmd
----plots
-------forecasts
--------2021-08-05
----------apps-approved-Credit Card.png
I set the option at the beginning
knitr::opts_knit$set(root.dir = rprojroot::find_rstudio_root_file())
And the code chunk to import the image:
knitr::include_graphics("forecast\\plots\\forecasts\\2021-08-05\\apps-approved-Credit Card.png"))
When I execute the above code chunk, I get the expected result:
[1] "forecast\\plots\\forecasts-training\\2021-08-05\\apps-approved-Credit Card.png"
attr(,"class")
[1] "knit_image_paths" "knit_asis"
However, when kniting the document, I get the following errors
[WARNING] Could not fetch resource 'forecast\plots\forecasts-training\2021-08-05\apps-approved-Credit%20Card.png': PandocResourceNotFound "forecast\plots\forecasts-training\2021-08-05\apps-approved-Credit Card.png"