Suppose that for some reason I want to store all the images that I want to use in a presentation in a location that is not the exact directory where the .qmd file itself lives, something like `things/stuff/imgs`. 

This would clearly work
```
![](things/stuff/imgs/elephant.png)
```

But gets very cumbersome to type. 

with `xaringan` and using R, it seemed like I could create a variable that stored the long annoying path name and then recycle it for all my figures, for example by creating a variable called `pth`

```
pth = file.path("things", "stuff","imgs")
```

And then using that `pth` pbject in an inline code chunk in the figure path

```
![](`r file.path(pth, "elephant.png")`)

```

This doesn't seem to work in Quarto, at least when rendering to revealjs, since `file.path` returns a string and it seems like quarto expects the file path to the figure to be bare?

Is there a way to use programmatically generated file paths for figures in quarto when knitting to revealjs?

2023-01-31T19:13:09Z
DanOvando
needs-repro
closed
using programatic file paths for images in reavealjs
https://github.com/quarto-dev/quarto-cli/issues/4183