Switching
Optimization

How to Reduce Image File Size (and How It Actually Works)

Lowering resolution and raising compression are not the same thing. Learn when quality loss is fine and how to shrink images for web and print the right way.

June 14, 2026· Last updated September 3, 2026

There are two ways to shrink an image file: resizing, which removes pixels, and compression, which keeps the pixels but discards information. Resizing wins by a wide margin. In our measurements, halving a photo's width from 1600px to 800px left a quarter of the pixels but dropped the file from 269KB to 33KB, an eightfold reduction. Resize to the pixels you actually need first, then close the remaining gap with quality.

There are two main ways to make an image smaller. One is resizing — reducing the number of pixels, i.e. the resolution. The other is compression — keeping the pixel count but packing the data more tightly. They produce different results, so using each in the right place lets you cut file size effectively while losing as little quality as possible.

Once you understand the mechanics, you can fix the two frustrations everyone hits: 'why is it still blurry after I shrank it' and 'why won't it get small enough.'

Lowering resolution (resizing)

Resizing reduces the width and height in pixels. Shrink a 4000×3000 photo to 1600×1200 and the pixel count drops sharply, so the file size falls fast. On screen and on the web, the original is usually far larger than the size it is actually displayed at, so resizing to the display size keeps the visible quality the same while cutting the file size.

Just remember that pixels you remove cannot be brought back. If you might print large later, keep the original separately.

Increasing compression

Compression keeps the pixel count but lowers a JPG's quality value. The lower the quality, the smaller the file — but go too far and colors smear or you get blotchy edges (artifacts). Photos tolerate a fair amount of compression, whereas images full of text or crisp lines are fragile and turn messy quickly.

Measured: how much does halving the width save?

People often say resizing beats compression, but rarely with numbers attached. We held JPG quality at 80 and reduced only the width of the same photo.

WidthPixel sizePixel countFile size
100%1600x10671,707,200269 KB
75%1200x800960,000105 KB
50%800x534427,20033 KB
25%400x267106,8005 KB
Quality fixed at 80; only the width changed. Measured by encoding three 1600x1067 (1.71MP) sources with libvips 8.18.3 and reading the actual byte counts.

Look at the halfway row. The pixel count falls to a quarter, but the file drops from 269 KB to 33 KB, roughly 8.1 times smaller. Fewer pixels means neighboring pixels resemble each other more closely, so compression efficiency rises alongside. That is why the size comes before the quality slider.

When quality loss is fine, and when it isn't

Before shrinking, ask whether the loss is acceptable for the purpose.

  • Usually fine — social media uploads, blog body images, preview thumbnails, email attachments
  • Be careful — printed materials, product photos, text-heavy documents, archival originals
  • Don't delete the original — keep it separate from the compressed or resized copy so you can rework it later

Web and print follow different rules

On the web, screen pixels are what matter, so matching the display size is enough — and you can shrink aggressively for faster page loads. Print is measured by dot density (usually around 300 dpi), so an image that looks fine on screen can come out blurry on paper. If printing is the goal, don't drop the resolution too far and don't over-compress.

Start from a target size

In practice, the question is often 'how small does it need to be?' When there is a fixed limit — a 5 MB attachment cap, a 2 MB forum limit — it is easier to compress toward that target. Switching's compress tool lets you set a target size and fits the file under it, and the resize tool lets you adjust the resolution too. Everything happens inside your browser, so files are never uploaded to a server.

Frequently asked questions

Does halving the width halve the file size?
No. Width and height both shrink, so the pixel count falls to a quarter, and the file usually falls further still. Our measurements went from 269KB at 1600px to 33KB at 800px and 5KB at 400px.
How many pixels do I need for screen use?
Body images on a blog look sharp at 1200 to 1600px wide, and thumbnails at 600 to 800px, even on high-density displays. Anything larger gets downscaled by the browser anyway, so the extra bytes are wasted.
Does compressing repeatedly shrink it further?
It does, but quality drops in visible steps. Lossy compression stacks new losses on top of information that is already gone, so saving once at your target quality looks considerably cleaner at the same file size.
Can I use the same targets for print?
No. Print works at 300 DPI, so a full A4 page needs roughly 2480x3508 pixels. An image reduced for the screen gets upscaled at print time and looks noticeably soft, so keep separate versions for screen and print.

Explore related tools