Fix guides · UX & conversion

How to fix distorted or blurry images (aspect ratio and resolution)

Images squashed out of shape, or too low-resolution for the screen they're shown on. How to fix the CSS and serve the right size on Shopify, WordPress, Webflow, Wix, Squarespace and Next.js.

Time to fix
15–45 minutes
Skill needed
Copy and paste
Who notices
Every visitor: product photos look stretched or soft

Why it matters

An image looks distorted when it's displayed at a different shape (aspect ratio) from the file, for example a square photo forced into a wide box.

It looks blurry when the file has fewer pixels than the screen needs: phones and high-resolution laptops need roughly two to three times the displayed width.

“If a rendered image has an aspect ratio that's significantly different to the aspect ratio in its source file (the natural aspect ratio), the rendered image may look distorted, possibly creating an unpleasant user experience.”

Chrome: Displays images with incorrect aspect ratio

Before you start

  • Distorted: the usual cause is CSS setting both width and height. Use object-fit: cover (to crop) or contain (to fit), or set only one dimension.
  • Blurry: upload larger originals and let the platform create smaller sizes, or provide a srcset with 2x versions.
  • Bigger isn't free: see our image delivery guide to keep large images light.

Fix it on your platform

Shopify

  1. Upload product photos at a consistent shape (all square, for example) and at a high resolution; Shopify creates the smaller sizes.
  2. If images are stretched, check the theme editor for an image ratio setting (adapt, square, portrait) on product cards. Otherwise fix the CSS in your theme.

WordPress

  1. In the Image block, pick a larger Resolution if the image looks soft, and avoid dragging it to a shape that doesn't match the file.
  2. Use the Aspect ratio and Scale (cover or contain) settings rather than setting width and height separately.

Webflow

  1. Select the image, and in the Style panel set the Fit option (object-fit) to Cover or Contain when you give it both width and height.

Wix

  1. Avoid stretching image elements out of proportion; check the image's display settings for a fit or fill option instead. Upload larger originals if photos look soft.

Squarespace

  1. Upload images between 1500 and 2500 px wide, as Squarespace recommends. For stretched images, adjust the image block's crop or aspect ratio setting.

Next.js

  1. With fill, give the parent a size and use object-fit in style or a class. With width and height, pass the file's real dimensions.
  2. Set sizes so phones get a large enough version for their screen density.
next/image
<div style={{ position: "relative", aspectRatio: "1" }}>
  <Image src={photo} alt="…" fill sizes="(min-width: 768px) 33vw, 100vw" style={{ objectFit: "cover" }} />
</div>

Any other site

  1. Use object-fit when setting both dimensions, and provide 2x sizes in srcset.
HTML
<img src="shirt-600.jpg" srcset="shirt-600.jpg 600w, shirt-1200.jpg 1200w" sizes="300px"
     width="600" height="600" alt="…" style="width: 300px; height: 300px; object-fit: cover">

Check that it's fixed

  • Compare the flagged images with the originals on a phone and a laptop.
  • Re-run your StudioLNC audit: the images should no longer be listed.

Find every issue like this on your site

Free audit of performance, accessibility, SEO and security, with fixes for your platform.