Advertisement

Google Ad Slot: content-top

Bootstrap 5 Image

~1 min read · Bootstrap
On this page

In Bootstrap 5, handling images is simple and offers various utilities for styling, responsiveness, and alignment. Here's a guide to using images effectively:

Image Shapes:

Bootstrap provides utility classes to create rounded, circular, or thumbnail-style images:

Rounded Corners

Paris

Circle

NYC

Thumbnail

San Fran

Class

Effect

.rounded

Adds rounded corners

.rounded-circle

Makes the image circular

.img-thumbnail

Adds padding and a border

Example
Cinque Terre Cinque Terre Cinque Terre
Try it yourself

Image Alignment:

Align images using utility classes.

Class

Alignment

.float-start

Left-aligned

.float-end

Right-aligned

.mx-auto d-block

Center-aligned

Example
Try it yourself

Responsive Images:

To make images responsive, add the class .img-fluid. This ensures the image scales with its parent container.

Example
Try it yourself