## Problem I am experiencing

When a code block produces a plot, that plot is saved in a subdirectory in the same directory as the .qmd file.

The quarto project attempts to integrate easily with Hugo (for which I am forever grateful 🙂).

This location of the output doesn't work very nicely with Hugo though:

Hugo expects images to be in the `/static` directory, while the .qmd file lives in the `/content` directory.

The rendered .md file contains this line:

```md
![](xxx/figure-gfm/cell-x-output-1.svg)
```
But since the path is not the one expected by Hugo, the plot is not produced in the .html.

## Workaround

There is of course a workaround, but it is cumbersome and far from ideal:

1. Copy the figure (and the subdirectory structure) to `/static` (and remember to update the copy if the code changes: this hardcoding is far from great...)
3. Add anything in `/content/**/figure-gfm` directory to .gitignore because adding heavy files to `/content` makes the rendering of the website very slow and eventually breaks it (since Hugo will try to render anything that is in `/content`).

## Questions

So my questions are:

1. Did I miss something and am I doing things wrong?
2. If not, is there a way to have quarto save plots in `../../static/xxx/figure-gfm` instead of `xxx/figure-gfm` when the format is `hugo`?

Thank you!!!

## quarto check

[✓] Checking Quarto installation......OK
      Version: 0.9.440
      Path: /opt/quarto/bin

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
      Version: 3.10.4
      Path: /usr/bin/python3
      Jupyter: 4.10.0
      Kernels: julia-1.7, julia-1.5, julia-1.6, python3

[✓] Checking Jupyter engine render....OK

[✓] Checking R installation...........OK
      Version: 4.2.0
      Path: /usr/lib64/R
      LibPaths:
        - /home/marie/R/lib
        - /usr/lib/R/library
      rmarkdown: 2.14

[✓] Checking Knitr engine render......OK

## Checklist

When filing a _bug report_, please check the boxes below to confirm that you have provided us with the information we need. Have you:

- [x] [formatted your issue](https://yihui.org/issue/#please-format-your-issue-correctly) so it is easier for us to read?

- [ ] included a minimal, self-contained, and reproducible example?

- [x] documented the quarto version you're running, by providing the output produced by `quarto check` in a terminal in your issue?

- [x] upgraded to the latest version (including your versions of R, the RStudio IDE, and relevant R packages)?

2022-06-02T00:53:21Z
prosoitos
closed
Location of plots not integrating well with Hugo
https://github.com/quarto-dev/quarto-cli/issues/1044