Overview

Embed an image from your vault as a figure in your document.

How you write it in Obsidian

![[system-levels.png]]

![[chart.png|Revenue by quarter]]

![Revenue by quarter](attachments/chart.png)

Supported: PNG, JPG/JPEG. GIF, BMP and WEBP are treated as PNG.

What Obsitex generates

\begin{figure}[h]
    \centering
    \includegraphics[width=\textwidth]{./images/chart.png}
    \caption{Revenue by quarter}
    \label{fig:revenue_by_quarter}
\end{figure}

The exported file name comes from the file in your vault, the caption from what you wrote after the bar. Layout and scaling are controlled by the figureEnvironmentText field of your document setup.

Caption and size

Obsidian uses one field for both the caption and the display size, and splits at the last vertical bar. Obsitex follows the same rule:

What you write Caption Size
![[image.png]] file name
`![[image.png 300]]` file name
`![[image.png Revenue by quarter]]` Revenue by quarter
`![[image.png Revenue by quarter 300]]`
`![Revenue by quarter 300](image.png)` Revenue by quarter

Only a plain number (300) or width×height (300x200) counts as a size. Anything else stays part of the caption — so a caption may contain a vertical bar itself.

<aside> ⚠️

The size does not reach the PDF yet. Obsitex recognises it and keeps it out of your caption, but does not pass it to LaTeX: the width still comes from figureEnvironmentText (full text width by default). Your image therefore looks smaller in Obsidian than in the PDF. To control the size today, set it in your preamble template instead of on the individual image.

</aside>

Referring to a figure

A [[…]] link can only target a heading, never a figure. To refer to an image, use the raw LaTeX command in backticks:

… as shown in `\vref{fig:revenue_by_quarter}`.