Why this matters
The production reason.
Layout shift usually starts before visual polish: images without dimensions, grids without stable tracks, and embeds without aspect ratios.
Reserve the space first, then make it beautiful. Users should not lose their reading position because an image finally loaded.
This is especially important for product cards, blog thumbnails, ad slots, and dashboards.
.media-frame {
aspect-ratio: 16 / 9;
overflow: hidden;
}
.media-frame > img {
width: 100%;
height: 100%;
object-fit: cover;
}