Choose analytics

Essential browser storage remembers your tool settings. Optional analytics helps us understand site use and loads only if you accept it. Image files, filenames and submitted URLs are not sent to analytics.

Read the Cookie Policy
Skip to content
CompressByURL
CompressConvertResizeTarget sizeBy URLWebsite scannerBlog
Start compressing
Homechevron_rightBlogchevron_rightWeb performance
Web performance

Fix GTmetrix “Properly size images” without making photos blurry

Changing a CSS width does not change the file your visitor downloads. Fix the delivered image dimensions, then check which responsive candidate the browser chooses at the viewport that triggered the warning.

SV
Saipavan V
Sep 29, 20264 min read

Updated Oct 2, 2026

Size images for the screen: topic-specific technical illustration
Editorial illustration

The short answer

  • checkMeasure the actual slot, not the uploaded file.
  • checkAccount for pixel density and larger layouts.
  • checkVerify srcset and currentSrc after deployment.
On this page
  1. Identify the image variant that GTmetrix flagged
  2. Calculate a useful width for each display slot
  3. Make the resize decision before the format decision
  4. Connect the replacement files to the responsive template
  5. Inspect the chosen resource on a fresh page load
  6. Define success in pixels, bytes, and visual quality

Identify the image variant that GTmetrix flagged

GTmetrix describes this finding as a mismatch between delivered image dimensions and the displayed image. The report points you to candidate resources. Copy the listed URL and compare it with the resource on the live page. A CMS may have already produced several sizes while a theme accidentally requests the original.

Record the test viewport and the page component. A warning for a 240-pixel sidebar card should not lead you to shrink the shared image used by a full-width detail page. Your task is to correct that particular request path. Keep the source original available for uses that still need its pixels.

Calculate a useful width for each display slot

Consider a card that occupies 320 CSS pixels on a narrow screen. At a chosen density of 2×, a 640-pixel candidate is a reasonable starting point. If the same design reaches 480 CSS pixels on desktop, a larger candidate may be useful there. These numbers are a worked layout example, not a mandatory sizing recipe.

Measure the slot after the page has settled and after any responsive breakpoint. Container padding, column gaps, and a sidebar all reduce the space actually occupied by the image. Using the whole viewport width for a card inside a three-column grid overestimates its needs. Maintain the crop’s aspect ratio unless the design deliberately uses a different crop.

Make the resize decision before the format decision

Start with the highest-quality source you own. Resize that source once to each intended output width. Repeatedly reducing and recompressing an already small derivative gives you less room to preserve detail. Compare the resized image with the intended view, especially textured products, faces, and fine architectural lines.

Then compare formats at those dimensions. A 640-pixel JPEG and a 2400-pixel WebP do not test the same variable. Keep the larger original outside the public delivery path if it has no page use, but retain it in your own source archive. Do not upscale a small original merely to fill a nominal export size.

Connect the replacement files to the responsive template

Prepare a short set of widths that match the real component rather than a huge list of arbitrary sizes. Supply appropriate image candidates and a sizes expression that describes the display slot. If your framework creates candidates automatically, inspect its generated HTML and make sure your layout information is accurate.

A fixed thumbnail can have a simpler setup than a fluid hero. A mobile crop can require art direction rather than width switching. Keep these concerns distinct in the implementation ticket: width variants answer resolution needs, while crop variants answer composition needs. Both should retain useful alt text and a predictable layout.

Inspect the chosen resource on a fresh page load

Open a fresh navigation at the target viewport and inspect the selected source URL. Resizing an already loaded page is not always a clean test of candidate selection because the browser may keep a previously downloaded larger image. Check the Network entry as well as the element. Test a second layout where the image is larger.

If the original is still requested, trace the relevant template setting. Common suspects include an incomplete srcset, a sizes value that describes the viewport instead of the column, and a theme setting that chooses full resolution. Replace the responsible reference rather than uploading another copy with a confusing filename.

Define success in pixels, bytes, and visual quality

For an illustrative acceptance check, a card could use a 640-pixel asset instead of a 3000-pixel asset while keeping the same 320 CSS-pixel slot. The width reduction is easy to confirm; byte savings depend on the image and encoding. Record the real files rather than assuming a fixed percentage from the pixel count.

Use CompressByURL to create the widths locally, then deploy them through your site’s workflow. Re-run the GTmetrix test under the same settings and inspect both small and large layouts. If the warning clears but the desktop image looks soft, the responsive set is incomplete. Correct that before marking the work done.

ComponentExample CSS widthExample 2× candidate
Small card320px640px
Article image720px1440px
Full-width heroMeasure actual layoutChoose variants after measuring

Common questions

Is 2× always required?

No. It is a starting choice for an example layout. Balance the image’s detail, supported devices, visible quality, and transfer budget.

Can CSS max-width fix the downloaded file size?

CSS controls presentation. It does not replace the large resource with a smaller encoded file; the delivery markup or image service must choose that file.

Sources and further reading

Technical references for the concepts in this guide. Examples with hypothetical values are illustrations, not measured results.

  • GTmetrix: properly size imagesnorth_east
SV

Saipavan V

Saipavan V writes practical guides for CompressByURL on browser-first image optimization, website image audits, and web performance. His articles connect technical explanations with steps you can verify on your own site.

More about the author

On this page

  1. Identify the image variant that GTmetrix flagged
  2. Calculate a useful width for each display slot
  3. Make the resize decision before the format decision
  4. Connect the replacement files to the responsive template
  5. Inspect the chosen resource on a fresh page load
  6. Define success in pixels, bytes, and visual quality
  7. Common questions
  8. Sources and further reading

Try it with your images

Local files stay on your device.

Resize an imageCreate a static candidate with dimensions that fit your intended display.arrow_forwardScan a public webpageDiscover static image candidates before inspecting important resources in your browser.arrow_forward

Explore the topics

Web performancechevron_rightWebsite auditschevron_rightDeveloper guideschevron_rightImage optimizationchevron_right

Keep going.

A few guides for your next useful fix.

View all guides arrow_forward
arrow_outward
Developer guides4 min read

Responsive images: get srcset and sizes right for your layout

Build responsive image variants using real slot widths, pixel density, and browser-selected sources. Includes a complete HTML card example.

Sep 21, 2026
arrow_outward
Developer guides4 min read

Next.js Image serving files that are too large? Check sizes first

Diagnose oversized Next.js Image downloads by matching sizes to grid columns, inspecting generated srcset, and separating source assets from delivery variants.

Sep 19, 2026
arrow_outward
Developer guides4 min read

Find oversized images with Chrome DevTools and currentSrc

Identify the image a browser actually downloaded, compare its slot and selected source, and capture a useful image audit without guessing from filenames.

Sep 5, 2026
Mascot organizing image cards for optimization

Compress images locally, from a URL, or from a webpage.

Reduce file size, convert formats and prepare web-ready assets in your browser.

Open the free image compressor
CompressByURL

Make images lighter. Keep local files private.

BlogAbout & contactPrivacyTermsCookies