Responsive Images
Choose between preserving an image's natural proportions and fitting a designed image slot.
Intrinsic proportions
max-width: 100% prevents overflow, while height: auto preserves the image's intrinsic ratio as it shrinks.
max-width: 100% prevents overflow, while height: auto preserves the image's intrinsic ratio as it shrinks.
Fluid images and designed slots use different object-fit strategies.
.fluid-image {
max-width: 100%;
height: auto;
}
.slot img {
width: 100%;
height: 100%;
object-fit: cover;
}