Use case or problem
As far as I know, there is currently no “official” way to add a caption to an image.
I would suggest, that an image with nonempty alt text, occurring by itself in a paragraph, will be rendered as a figure with a caption. The image’s alt text will be used as the caption. Inline Markdown in the alt text should be interpreted.
That means that following Markdown snippet
![This is the caption](image.png)
![[image.png|This is the caption]]
will be rendered as something like
<figure> <img src="path/to/image.png" /> <figcaption>This is the caption</figcaption> </figure>
This is the way pandoc with the
implicit_figures extension handles figure captions in Markdown documents.
Concerning implementation details I would suggest to make this behavior optional as an extension.