How to Use "Includes" for Rendering Images at Different Directory Levels? #10559
-
DescriptionHello, I am writing for a larger project and I want to keep my writing as modular as possible, so the Includes feature is super handy! As stated on the Quarto docs page, relative references are resolved based on the main file, so if the files are not at the same directory level, rendering images becomes an issue. If I don't want all of the files to be at the same directory level, what is the recommended way to use {{ < includes > }} by still being able to render images in included files. Hopefully the following illustrates what I'm asking. Assuming that my project directory looks something like this;
Each Example Contents of
Aside from restructuring the whole project, are there any ways to accurately locate images for |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
"Absolute paths" in Quarto are absolute to the root of the project. |
Beta Was this translation helpful? Give feedback.
"Absolute paths" in Quarto are absolute to the root of the project.
So use absolute paths, then all your includes will work properly no matter where they are.