Figure with caption

Is it possible to render an image with caption like this?

    <img src='image.jpg' alt='title' />
    <figcaption>Caption goes here</figcaption>

You would have to just enter that html in the markdown. Alternatively you could create a simple plugin or a shortcode (for shortcode plugin) to do it.

OK, thanks. I’ll explore the options. I plan to move a few Wordpress sites to Grav and I’m having fun with it. I don’t think I’m going to miss Wordpress…

heh, you won’t I promise!

BTW here’s the Shortcodes plugin:

You can create custom plugins that hook into this to add pretty much anything you like.

MultiMarkdown and Pandoc turn Markdown images that exist alone in their own paragraph into figure>img+figcaption, while keeping inline images as the standard img.

Is there any (easy) way of swapping the Parsedown for any of those Markdown parsers? I read the suggestion about using [the Shortcakes plugin](, but I had rather stick to public markdown syntax (even if it is a specific flavor) if I can.

Alternatively, you can save some time and use the ImgCaptions-plugin which:

Wraps images in and captions in based on the title-attribute of the img-element.

Unfortunately ImgCaptions converts all images, instead of only those in their own paragraphs. figure is a block-level element and therefore not appropriate for inline images. Converting only the former is the behavior of Multimarkdown & Pandoc. I have added this feature request as an issue in the plugin’s repository.

Ignore my last message. ImgCaptions does indeed do its thing only on images in their own pararaphs, not on inline images. I was misled by the theme’s CSS that I am using applying display:block to all images (-_-:wink:

Trying out this plugin It seems it’s easy to control which images plugin includes/excludes by including/omitting image title in markdown ![Upload images](upload.jpg "Upload images") would add figcaption, whereas ![Upload images](upload.jpg) would not.

Yes, the <figcaption>-element is only added if a title is found.