blog/themes/stack/demo/content/post/Image Gallery/index.md
2026-07-31 15:38:57 +08:00

1.3 KiB

title description date slug image categories tags toc
Image Gallery Showcasing the built-in image gallery support 2026-01-26 image-gallery helena-hertz-wWZzXlDpMog-unsplash.jpg
Documentation
Gallery
Photoswipe
false

Stack theme has a built-in support for image galleries. It allows you to create a beautiful gallery by simply placing multiple images side-by-side.

Photo by Florian Klauer on Unsplash Photo by Luca Bravo on Unsplash

Photo by Helena Hertz on Unsplash Photo by Hudai Gayiran on Unsplash

How it works

The gallery is powered by Photoswipe and a custom internal script. It automatically calculates the best layout for your images based on their aspect ratios.

To create a gallery, you just need to put multiple images in the same line (or paragraph).

Syntax

![Image 1](image1.jpg)  ![Image 2](image2.jpg)

![Image 3](image3.jpg)  ![Image 4](image4.jpg)

Note

: There should be two spaces between the images to ensure they stay in the same line in Markdown


Gallery Syntax inspired by Typlog