Resize Images for Your Website

The browser downloads every pixel you send, then discards whatever does not fit the layout. That gap between the uploaded width and the rendered width is pure waste, and it is measurable: a 4000×3000 camera file weighs 1,360,339 bytes, while the same photo resized to a 400-pixel square weighs 53,032. This page works out where the line sits for common layouts.

Try the free tool now

100% in your browser — no upload, no account, no watermark.

Open Resize Image for Website

The width ladder, in bytes

One 4000×3000 photo, resized to four square widths. JPEG output, quality 0.92, nothing else changed:

OutputPixelsBytesGrowth vs previous
200×20040,00014,079—
400×400160,00053,0323.77× bytes for 4× pixels
800×800640,000196,2943.70× bytes for 4× pixels
1080×10801,166,400347,0481.77× bytes for 1.82× pixels

Doubling the width quadruples the pixel count but multiplies the file by about 3.7 — JPEG gets slightly more efficient as the canvas grows, because the compressed stream's fixed overhead is amortised. The practical consequence is that halving an image's displayed width cuts its weight by roughly 73%, not 50%.

What a 400-pixel slot really needs

A layout slot 400 CSS pixels wide is not a 400-pixel image request. On a screen with devicePixelRatio 2 — most phones and many laptops — the browser samples 800 device pixels across that slot. Serving 400 makes the image look soft; serving 1080 is 1.82× more pixels than needed and 1.77× the bytes.

The rule that follows: export at the CSS width multiplied by 2, and stop there. 2× is where the visible return ends. A 3× export adds 2.25× the pixels of a 2× one for a difference almost nobody can see at normal viewing distance.

The 25× waste of an unprocessed upload

Put the 1,360,339-byte original into that 400-pixel slot and every visitor downloads 25.7× the bytes the slot can display. The 400×400 export is 53,032 bytes, so 96.1% of the original never reaches a visible pixel — it is downloaded, decoded, resampled and thrown away.

This is not theoretical bandwidth: it lands on Largest Contentful Paint, the metric that measures when the biggest element on the page finishes rendering. Mobile connections feel it first because the download is the dominant cost, not the decode.

A four-step workflow

  1. Measure the slot: open the page, inspect the image element, note its rendered CSS width.
  2. Multiply by 2 for high-density screens and load the source in the resize tool (20 MB cap, .jpg, .jpeg, .png or .webp).
  3. Type the width with the aspect lock on so the height follows the source ratio — or unlock if the design needs a fixed box.
  4. Download, then run the result through Compress Image when the file still exceeds your budget.

Each run counts once against the 20 free daily operations, so a one-off batch of eight images fits comfortably inside a day.

Budgeting a page

A full-width hero at 1600×900 exports at 426,161 bytes for the photo fixture. The same hero at 2560×1440 is 924,459 bytes — 2.17× the weight for 2.56× the pixels — and is only worth serving to viewports that actually reach 1280 CSS pixels at 2× density.

In-content images at 800×800 cost 196,294 bytes. Sidebar and card thumbnails at 400×400 cost 53,032. A page with one hero, four content images and six cards therefore carries roughly 1.5 MB of imagery before compression, which is the number to reduce when the page feels slow.

About this guide

Written by
The ImageTools Pro team
Last reviewed
October 2026
How we test
Steps run in a real browser on real PNG, JPEG and WebP files

We revise this page whenever browser APIs, format support or recommended settings change. Corrections are welcome — tell us from the contact page.

Tools we recommend

Frequently Asked Questions

Should I resize to the CSS width or double it?

Double it for high-density screens, then stop. 2× covers phones and laptops; 3× adds weight without visible gain.

Why is halving the width not halving the file?

Bytes scale at roughly 3.7× per doubling, not 4×, because JPEG overhead is amortised. Halving gives about a 73% cut.

Does resizing hurt quality?

Downscaling discards pixels the layout never displays. What it removes is detail the browser would have thrown away anyway.

Resize before or after compressing?

Resize first. Reaching a small target from a 4000-pixel source requires far more quality loss than from an 800-pixel one.

Ready to try it?

All tools are free and run entirely in your browser.

Open the tool now

We value your privacy

This site is ad-supported by a partner that may set a cookie to personalize ads. Reject and no third-party ad scripts load at all. All image processing stays 100% in your browser either way.