-
DescriptionI'm finding that Directory structure:
project:
type: default
execute-dir: project
render:
- qmd/make-image.qmd
- qmd/load-image-v1.qmd
- qmd/load-image-v2.qmd
post-render: postrender.R
format:
html:
embed-resources: true I'm setting
---
title: Load image (v1)
---
```{r}
#| label: check
getwd()
file.exists("images/img.png")
```
The image cannot be fetched during render:
```{r}
#| label: load-image
knitr::include_graphics("images/img.png")
``` However, temporarily copying the Is this expected behavior of I'm running Quarto v1.4.550 on macOS Ventura 13.4. Output of
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Could you share your setup as a Git repository? (only what's needed to reproduce the issue, everything else should be removed) Why are you using ![](/images/img.png) Note that paths are resolved from document: knitr::include_graphics("images/img.png") means/translates to (thus why don't use markdown directly?) ![](images/img.png) There is no |
Beta Was this translation helpful? Give feedback.
Whatever is done in the code cells is done based on the working directory which can be set as you did.
Once computations are done, anything that relies on paths should start with
/
for absolute to project root paths which in case of single document is the document, else it's where_quarto.yml
is.Or use paths relative to the document calling/using the paths in question.