From: https://forum.obsidian.md/t/adding-caption-to-images/16431/40?u=falconsensei
And info on callouts: https://help.obsidian.md/Editing+and+formatting/Callouts
More alternatives in the discussions, but this one seems the best.
From source:
Using callouts for captions works well for me. Thanks for your excellent idea!
Here’s my current CSS snippet for figure callouts. It has three variants: `[!figure]` is the default for figures that span the whole column width. `[!figure-left]` and `[!figure-right]` are floating images.
```
.callout[data-callout^="figure"] {
padding: .5em;
margin: .5em;
& .callout-icon {
display: none;
}
& .callout-title {
padding: 0;
margin: 0;
}
& .callout-content {
--callout-content-background: rgba(0, 0, 0, 0);
padding: 0;
margin: 0;
border: none;
box-shadow: none;
}
}
.callout[data-callout^="figure-right"] {
float: right;
width: 50%;
}
```
to use:
```
> [!figure] ![[35.jpg]]
> *Figure 7*: Occaecati rerum error quis assumenda **perferendis** sequi eos in id.
```