Bootstrap 5 image galleries display collections of images in responsive grid layouts. This page covers 4 gallery patterns — grid, hover overlay, featured and filtered — each ready to use in portfolios and product pages.
Quick Setup
Galleries need only Bootstrap 5 CSS:
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet"/>
Key Classes Reference
| Class | What It Does |
|---|---|
.img-fluid | Makes images responsive |
.row.g-3 | Grid with gap between images |
.col-6.col-md-4 | 2 cols mobile, 3 cols desktop |
.object-fit-cover | Fills container without distortion |
.rounded | Rounded image corners |
.position-relative | Enables overlay positioning |
.position-absolute | Positions overlay over image |
1. Bootstrap 5 Grid Image Gallery
A responsive 3-column image grid using Bootstrap's grid system. 1 column on mobile, 2 on tablet, 3 on desktop.
2. Bootstrap 5 Gallery with Hover Overlay
Image grid where hovering reveals an overlay with caption and view button.
3. Bootstrap 5 Featured Image Gallery
Gallery with one large featured image and smaller thumbnails beside it.
4. Bootstrap 5 Filtered Image Gallery
Gallery with category filter buttons. Click to show only images from that category.
Frequently Asked Questions
Need a Full Bootstrap 5 Admin Dashboard?
Get a complete Angular 21 + Bootstrap 5 dashboard with 50+ components — built by the same team behind BootstrapPlanet.
Browse Templates →Use code FIRST30 for 30% off your first purchase.