This document provides a guide on how to use images in the hbstack framework, including various methods of rendering images in markdown files.
This document provides a guide on how to use images in the hbstack framework, including various methods of rendering images in markdown files. Hugo provides two places to keep the images, one is in the static directory and another is in the assets directory. The images in the static directory are served as static files, while the images in the assets directory are processed by Hugo.
You can use images from the static directory by referencing them directly in your markdown files. For example, if you have an image located at static/images/example.jpg, you can include it in your markdown file using three different methods:
![]() Syntax1
figure Shortcode1{{\< figure src="/images/example.jpg" alt="Example Image" caption="This is a captin of example image." >}}

This is a caption of an example image.
1{{\< figure src="/images/example.jpg" alt="Example Image" width="300" height="200" caption="This is an example image." >}}

image with width and height of 300x200.
1{{\< figure src="/images/example.jpg" alt="Example Image" class="ma0 w-75" caption="This is an example image with Bootstrap styling." >}}

image with Bootstrap styling (responsive, fits page width, centered).
According to the Hugo documentation, you can also use images from the assets directory. The images in the assets directory are processed by Hugo, which means they can be optimized and transformed before being served.
![]() Syntax1
figure Shortcode1{{\< figure src="/assets/images/example.jpg" alt="Example Image" caption="This is a caption of example image." >}}

This is a caption of an example image.