Explore Bato Web Agency Webflow Certified Partner Profile Explore Bato Web Agency Webflow Certified Partner Profile

Why does a responsive image look stretched or distorted?

Illustration without a description Illustration without a description

A responsive image looks stretched when CSS forces its rendered width and height into a ratio that differs from the source file. For example, a 3:2 photograph becomes visibly distorted if the layout assigns it a square box and uses the default object-fit: fill. Preserve the source ratio or choose an explicit crop.

 

For an ordinary content image, let one dimension determine the other. The browser can then scale the image without changing its proportions:

 

.article-image {
display: block;
width: 100%;
height: auto;
}

 

Distortion often appears after a broad rule such as img { width: 100%; height: 100%; } reaches logos, illustrations and editorial images with different shapes. HTML width and height attributes are usually safe when they describe the file’s intrinsic dimensions. Responsive CSS may change the displayed width, and the browser uses the intrinsic ratio to calculate the height and reserve space before the file loads.

 

A fixed-ratio card or hero needs a deliberate fitting rule. Use object-fit: cover when the image must fill the box and some cropping is acceptable. Use object-fit: contain when every part of the image must remain visible and empty space is acceptable. The image element needs defined box dimensions before object-fit changes how its content is drawn.

 

.card-image {
width: 100%;
aspect-ratio: 4 / 3;
object-fit: cover;
}

 

Check the source file as well as the CSS. A low-resolution image enlarged far beyond its intrinsic size becomes soft or pixelated, which is different from geometric stretching. A wrong srcset width descriptor can also make the browser’s choice less efficient, but it does not normally alter the aspect ratio unless different candidates were exported with inconsistent crops.

 

Use browser developer tools to compare the image element’s rendered dimensions with its natural dimensions. Temporarily disable width, height, aspect-ratio and object-fit declarations until the proportions return to normal, then restore only the rule the component needs. Test at narrow and wide widths because a media query may introduce the conflicting height only at one breakpoint.