Bootstrap 5.3 Image Patterns

Responsive Images

Use .img-fluid to make images scale with parent width.

Responsive image (800x400)

Resize the browser to see the image scale.

Image Thumbnails

Use .img-thumbnail for a rounded 1px border appearance.

200x200
150x150

Rounded Variants

Default

No class

.rounded

.rounded

.rounded-circle

.rounded-circle

.rounded-0

.rounded-0

.rounded-pill

.rounded-pill

Rounded Sizes

.rounded-1
.rounded-2
.rounded-3
.rounded-4
.rounded-5

Image Alignment with Floats

Float Start (Left)

.float-start

This paragraph demonstrates text wrapping around a floated image. The image uses .float-start to float to the left, and .me-3 adds margin to the right. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam id dolor id nibh ultricies vehicula ut id elit.

Float End (Right)

.float-end

This paragraph demonstrates text wrapping around a right-floated image. The image uses .float-end to float to the right, and .ms-3 adds margin to the left. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam id dolor id nibh ultricies vehicula ut id elit.

Centered Block Image

Use .d-block and .mx-auto to center a block-level image.

.d-block .mx-auto

Picture Element for Art Direction

Use the <picture> element to serve different images based on viewport size.

Responsive picture element demo

Resize the browser to see different images load at different breakpoints.

Images in Grid Layout

Image 1
Image 2
Image 3