Gallery Slider Documentation

Complete guide to using the gallery slider component with examples and customization options

The Gallery Slider component provides an elegant way to display multiple images with navigation controls, thumbnails, and captions. This guide covers everything from basic usage to advanced customization.

File Organization for Images

Understanding how to organize your images is crucial for effective gallery management:

Hugo Site Structure
├── static/
│   └── images/
│       ├── docs/
│       │   └── gallery-slider-doc/
│       │       ├── landscape-1.jpg
│       │       ├── landscape-2.jpg
│       │       ├── portrait-1.jpg
│       │       └── thumb-landscape-1.jpg  ← Optional thumbnails
│       ├── gallery/
│       │   ├── nature/
│       │   │   ├── forest-1.jpg
│       │   │   └── forest-2.jpg
│       │   └── architecture/
│       │       ├── building-1.jpg
│       │       └── building-2.jpg
│       └── posts/
│           └── my-post/
│               ├── hero.jpg
│               └── detail.jpg
├── content/
│   └── posts/
│       └── my-gallery-post.md  ← Your content file
└── layouts/
    └── partials/
        └── gallery-slider.html  ← Component template
aa.Organization Tips: Group images by topic or post in subdirectories. Use consistent naming conventions like image-name.jpg and optional thumb-image-name.jpg for custom thumbnails.

URL Structure

  • Local images: /images/docs/gallery-slider-doc/landscape-1.jpg
  • Web images: https://example.com/image.jpg
  • Relative paths: Always start with / for Hugo static files

Here’s a basic gallery with local images: