Gallery
A gallery is a collection of images or multimedia content displayed in a visually appealing and organized manner. It serves as a way to showcase photographs, artwork, or other visual assets, allowing users to explore and interact with the content. Galleries often include features such as image thumbnails, navigation arrows, and a modal window or lightbox to help users browse through the content.
Overview
Anatomy
- Image
- Caption
- Margin
When to use
- When large amounts of multimedia content need to be displayed at once
When not to use
- For a limited amount of multimedia content — use a single image or embed instead
- If page load speed is a concern
Best practices
Compress and optimize image sizes
Reducing the file size without hindering quality can improve page load speed and overall performance.
Add descriptive alt text
Adding alt text to images ensures accessibility for users who use screen readers.
Provide captioning
Provide relevant captioning or descriptions of images to add context.