Skip to content

5. Shortcodes

Will Holmes edited this page May 22, 2022 · 7 revisions

Adding Images to Post Content

If you want to add images to your markdown content, use Hugo's built-in <figure> shortcode with a path to the image location.

{{< figure src="/posts/example-post/example-image.png" class="post__image" alt="Example image alt" >}}

To make the image responsive, add the CSS class post__image to the shortcode.

Clone this wiki locally