Usage
{{< gallery t = "shortcode" from = "my-photos" [mode = "medium"] >}}The first unnamed parameter can be used instead of ‘from’
Description
Display a responsive image gallery with modal popups and file extension indicators. Images are automatically resized and optimized using Hugo’s image processing pipeline.
Parameters
indicates required parameter
from =
"string"REQUIREDgallery
Name of the frontmatter parameter containing array of image paths
mode =
"string"large
Size of gallery thumbnails: large (300px), medium (180px), small (75px)
Possible values: small, medium or large
Possible values: small, medium or large
Examples
Basic large gallery using frontmatter parameter ‘photos’
{{< gallery "photos" >}}Medium-sized gallery with named parameter
{{< gallery from="my-images" mode="medium" >}}Frontmatter:
my-images: ["/images/photo1.jpg", "/images/photo2.png"]Small gallery for thumbnail overview
{{< gallery "thumbnails" mode="small" >}}Small size hides file extension labels for cleaner look
Additional Information