AI websites

Step-by-step tutorial

Why Your Website Images Look Blurry (and the Sizes That Fix It)

Your photos load fine but look soft or fuzzy on the live site. Find whether the file is too small for its display size, then resize and re-upload at the right dimensions.

Product links on this page are ordinary official links. No affiliate commission is currently attached. Read our disclosure.

Quick answer

Compare the file’s pixel size with the size the page displays → re-export at the displayed size, allowing for high-density screens → re-upload and check on a phone.

A blurry image is usually a size mismatch, not a broken file: the picture loads, but its file has fewer pixels than the space it fills, so the browser stretches it. The most common causes are a small file shown large, a file that is fine on a standard screen but too small for a phone’s denser display, and a builder that shrank or over-compressed the upload. This guide is for a static website built with an AI tool or builder, where you can re-upload images and, if needed, ask the AI assistant to edit the code.

Different problem? If the picture does not appear at all, or the page looks unstyled, follow the guide to missing images and styles instead — that is a file that never arrives, not a file that is too small.

Before you start

Pick the worst-looking image on your site and note two facts about it before changing anything: how wide it is displayed on the page, and how wide the file itself is. The gap between those two numbers is the diagnosis, and the rest of this guide is about closing it.

You will need the original image file if you have it — the highest-resolution copy you own, not the copy already on the site. If the site is your only copy, download the file from the live page first and check its size; a file that is already small cannot be sharpened by enlarging it, and you will need the original or a new export.

Step 1: measure the mismatch

Open the live page in your browser, right-click the blurry image and choose Inspect. In the developer tools, the image’s displayed size appears in CSS pixels, and its natural, or intrinsic, size is shown alongside it. The comparison that matters is simple: the file’s pixel width should be at least as large as the displayed width, and on a high-density screen it should be larger still. One caution on the natural size: it is density-corrected, so it is not always the raw pixel width of the file on the server — the console snippet below shows how to pin down the actual file.

A phone or a modern laptop can pack two or three image pixels into every CSS pixel. That ratio is the device pixel ratio, and it is why a file can look fine on one screen and soft on another. As a worked example, not a measurement from a real site: a hero image displayed 800 CSS pixels wide on a phone with a 2x display needs a file about 1,600 pixels wide to look sharp; a 800-pixel file stretched across that space has to invent half its pixels, and the result looks soft. The same file on a standard 1x desktop display at the same 800-pixel width would look fine, because every pixel it has is used once.

If you prefer numbers over the Inspect panel, paste this into the browser console on the live page. It lists every image with its displayed and natural sizes, so you can spot the stretched ones at a glance:

document.querySelectorAll('img').forEach(img => {
  console.log(img.currentSrc.split('/').pop(),
    'displayed:', img.clientWidth + 'x' + img.clientHeight,
    'natural (density-corrected):', img.naturalWidth + 'x' + img.naturalHeight);
});

This is a diagnostic method, not a test result: run it on your own page and read your own numbers. Read the two size figures carefully. currentSrc names the file the browser actually selected for this screen — with responsive images that may not be the file in the plain src. And naturalWidth is density-corrected: it reports the selected file’s width in CSS pixels, not the raw pixel width of the file on the server. To get a file’s true pixel size, open the currentSrc address on its own and read its dimensions there, or check the file itself. The planning comparison stays simple either way: a served file whose true pixel width is smaller than its displayed width — or smaller than the displayed width times the screen’s pixel ratio — is a confirmed size mismatch. A file that is already several times larger than its display size is not the cause of the blur; look at compression or at Step 4 instead.

Step 2: check whether the site shrank your upload

Compare the file the site serves with the file you uploaded. The currentSrc file from Step 1 is the served file — check its true pixel size the same way, by opening it directly. If you uploaded a 2,400-pixel photo and the served file is 800 pixels wide, something between the upload and the page resized it — many builders and hosts do this automatically to save bandwidth, and the setting is not always obvious.

Open the image settings in your builder and look for anything about image size, quality, or optimisation. Some builders let you pick a size or turn off automatic compression; others do not expose the setting at all. If there is no such setting, export the image at the exact target size yourself before uploading, so the builder has nothing left to shrink — a file that is already the right size survives most automatic resizing unchanged.

Step 3: export the file at the right size

Work from the highest-resolution original you have, and export a new copy at the target size. The target is the displayed width from Step 1, multiplied by the highest pixel ratio your visitors use — 2x is a safe planning figure for modern phones and laptops; 3x covers the densest phone screens. In the worked example above, an image displayed 800 CSS pixels wide should be exported at about 1,600 pixels wide for 2x screens.

On quality, lower it in small steps and compare, rather than picking the smallest file at once. Over-compression is its own kind of blur: blocky patches and smudged edges, especially in smooth areas like skies. Export at the target pixel size first, then reduce quality one step at a time until softness appears, and keep the last clean version — the right number depends on the image, so judge by looking, not by the slider position.

Two free tools for this step, both verifiable on their official pages: Squoosh, Google’s browser-based image optimiser, which resizes and lets you compare the original and the compressed version side by side; and ImageMagick, the command-line tool Google’s own serve images with correct dimensions guide suggests for resizing. Either one does the job — use the one you are comfortable with.

Step 4: serve the right size to each screen

If you can edit the page code, give the browser more than one file size to choose from. HTML’s srcset and sizes attributes let you list the same image at several widths, and the browser picks the one that fits the screen it is on. This is the mechanism MDN’s responsive images guide documents: srcset lists the files with their real pixel widths, and sizes tells the browser how wide the image will be displayed at each screen width, so it can choose sensibly instead of guessing.

<img src="workshop-800.jpg"
     srcset="workshop-400.jpg 400w,
             workshop-800.jpg 800w,
             workshop-1600.jpg 1600w"
     sizes="(max-width: 600px) 100vw, 800px"
     alt="Workshop table with balloon supplies">

In this example, the image is shown full-width on screens up to 600 pixels wide and at 800 pixels on larger screens, and the browser picks the 400, 800, or 1,600-pixel file to match. The numbers are an example for a page with that layout — your own sizes values must match your own page’s layout, or the browser will keep picking the wrong file. If you use an AI coding assistant, paste the layout widths from Step 1 into the prompt and ask it to generate the srcset for the actual display sizes, then check the result in the browser as described in Step 5.

If you cannot edit code, the builder route from Step 2 is the whole fix: re-upload the correctly sized file and let the builder serve it. Either way, do not also set a CSS width larger than the file — a width: 100% rule on a small file is a common way for a sharp upload to turn blurry on a wide screen.

Step 5: check the result on a real phone width

Re-upload, publish, and look at the page again — on a phone, not just on your laptop. Clear the browser cache or open a private window first, so you are seeing the new file rather than the old one the browser saved.

  • The image looks sharp when you zoom in on the detail, not just at a glance.
  • The same image is sharp on a phone screen, where the pixel ratio is highest.
  • Text and layout are unchanged, and the page does not scroll sideways.
  • The file the page now serves is the size you exported — repeat the Step 1 check to confirm.

For a second opinion, run a Lighthouse performance audit in Chrome DevTools and look for the Properly size images finding, which lists images served larger than displayed. It checks the opposite direction — wasted bytes rather than blur — but a page with no findings in either direction has its sizes roughly right. An audit only emulates one screen at a time, though, so the real-phone check above is still the one that catches density blur.

If it is still blurry

Work through these in order, changing one thing at a time:

  • Still soft after re-uploading: the browser or a CDN may be serving the cached old file. Wait a few minutes, then check in a private window. If it is still the old size, the builder may have re-compressed the new upload — re-export at the exact target size and try once more.
  • Sharp on desktop, blurry on mobile: the mobile layout may display the image wider than the desktop layout, or the phone’s pixel ratio is higher than you planned for. Measure the displayed width at the phone width and export for that size.
  • Blocky rather than soft: that is over-compression, not under-sizing. Re-export from the original at a higher quality setting and compare.
  • Blurry only inside a slider or gallery: the component may be loading a thumbnail-sized file for the large view. Check the component’s own image setting — it may have a separate size choice from the page’s image setting.
  • A background image is blurry: background images set in CSS follow the same rule — the file must be at least as large as the area it covers, times the screen density. A small file stretched over a full-width banner will always look soft.

Sources and testing notes

  • MDN: HTMLImageElement naturalWidth — naturalWidth returns the intrinsic, density-corrected width in CSS pixels, not the raw pixel width of the file. Checked 2026-11-30.
  • MDN: Responsive images — srcset, sizes, and how the browser chooses between file sizes. Checked 2026-11-29.
  • web.dev: Serve images with correct dimensions — Google’s guide to matching file size to displayed size, and the Lighthouse “Properly size images” audit. Checked 2026-11-29.
  • Squoosh — Google’s browser-based image optimiser for resizing and comparing quality. Checked 2026-11-29.
  • ImageMagick — command-line resizing, as suggested in the web.dev guide above. Checked 2026-11-29.

Testing notes: no live site was tested for this article. The pixel-width figures (for example, an 800-pixel display needing a roughly 1,600-pixel file on a 2x screen) are worked examples illustrating the arithmetic, not measurements from a real page. The console snippet in Step 1 is a diagnostic method to run on your own site; the srcset example in Step 4 is illustrative code for a stated layout, not a tested deployment. Builder compression behaviour varies by product, so check your own builder’s settings rather than assuming any particular behaviour.

Questions & answers

My image looks sharp on my laptop but blurry on my phone. Is the file broken?

Probably not. Phones pack two or three image pixels into every screen pixel, so a file that is exactly the right size on a standard display can be too small on a phone. Check the file's pixel width against the displayed width times the phone's pixel density, and re-export at the larger size.

Can I fix a blurry image by making it bigger in the page editor?

No — stretching a small file across a larger space is usually what made it blurry in the first place. The fix is a larger source file: export or re-upload the image at the pixel size the page actually displays, allowing for high-density screens.

The original photo is huge. Why is the version on my site still blurry?

Some builders and hosts resize or compress uploads when you add them, so the file the site serves can be much smaller than the file you uploaded. Compare the served file's pixel size with the size the page displays; if the served file is the small one, export at the target size yourself and re-upload.