Image Optimization

How to Reduce Image File Size Without Losing Visible Quality

Why image files are large and the four things that actually shrink them: fewer pixels, the right format, sensible quality settings and removing hidden data. With an order to do them in.

ImageBulk Team··9 min read

A photo straight from a modern phone is often four to eight megabytes. The same photo, looking identical on a web page, can be two hundred kilobytes. Nothing magic happens between the two: the large file carries pixels nobody will see, detail nobody can perceive, and data that is not part of the picture at all. Reducing file size is the business of removing those three things in the right order.

What Makes an Image File Large

Four things decide the size of an image file, and they are worth separating because each has its own fix.

  • The number of pixels. A 4000 × 3000 image has twelve million of them. This is the largest factor by far.
  • The format. The same picture can be several times larger in one format than in another.
  • The quality setting, for formats that have one (JPG, WebP, AVIF).
  • Hidden data: camera settings, location, an embedded preview and sometimes a colour profile.

Step 1: Reduce the Pixels First

Halving an image’s width and height leaves a quarter of the pixels, and roughly a quarter of the file. No compression setting comes close to that. So before touching quality, ask how large the image will actually be displayed.

A product image shown in a 600-pixel-wide column does not need to be 4000 pixels wide. Allowing for sharp, high-density screens, about twice the displayed width is plenty: 1200 to 1600 pixels for most page content, 2000 or so where a shop offers zoom. Everything beyond that is downloaded and then thrown away by the browser.

This step is also the one place where you cannot go back, so resize a copy and keep the original.

Step 2: Use the Right Format

Photographs belong in a lossy format (JPG, WebP or AVIF), graphics with flat colour and text in a lossless one (PNG, or lossless WebP). Getting this backwards is the most common cause of a needlessly large file: a photograph saved as PNG is typically five to ten times larger than it needs to be.

For images on a website, WebP is usually a quarter to a third smaller than JPG at the same visual quality, and every current browser displays it. AVIF is smaller again but slower to create. Our guide to choosing between JPG, PNG, WebP and AVIF covers the trade-offs.

Step 3: Choose a Sensible Quality

The quality slider in lossy formats is not a percentage of anything; it is a dial for how aggressively detail is discarded. Three things are useful to know about it.

The top of the scale is wasteful. Between about 90 and 100, file size climbs steeply while the picture barely changes. A JPG saved at 100 is often several times the size of the same image at 80, and very few people could tell them apart.

The useful range is roughly 70 to 85. For photographs viewed at normal size, this is where files are small and the loss is invisible. Go lower for thumbnails; stay near the top of the range for images people will zoom into.

Look before you trust a number. Compression artefacts show up first in smooth gradients such as skies and studio backdrops, and around sharp edges and text. Compare the compressed image with the original side by side at full size. If you cannot find the difference, the setting is right.

The encoder matters too. The same quality number gives different results in different software. Our compressor uses mozjpeg for JPG, an encoder built specifically to produce smaller files at the same visual quality than the standard one in browsers and many apps.

Step 4: Handle PNG Differently

PNG has no quality slider, because it never discards detail. There are two ways to shrink one.

The first is to compress it harder without changing a pixel. This is always safe and usually saves between a few percent and a fifth.

The second is to reduce the image to a palette of 256 colours. For logos, screenshots, icons and flat-colour product images this is invisible, because they did not use more colours than that to begin with, and in our tests it cut files by 60 to 75 percent. For photographs it is visible as banding in smooth areas, so check the result; a photograph should not be a PNG in the first place.

Step 5: Remove What Is Not the Picture

Camera files carry metadata: the camera model and settings, the date, often the GPS location, and sometimes a small embedded preview image. Together this can add tens of kilobytes to every file, which matters most on small images such as thumbnails, where it can be a large share of the total. Removing it changes nothing visible, and removing the location is worth doing for privacy before you publish a photo anywhere.

When You Have to Hit a Specific Size

Upload forms often set a hard limit: under 2 MB, under 500 KB, under 100 KB for a profile photo. Guessing at quality settings until the file fits is slow. A faster method is to work backwards from the limit: set the target size and let the software find the highest quality that fits under it. Our bulk image compressor does this for JPG, WebP and AVIF, for a whole batch at once.

Be realistic about very small targets. A large, detailed photograph cannot be made to fit in 50 KB at its full dimensions without looking bad. If the target is small, reduce the dimensions first, then compress: a smaller image at good quality always looks better than a large one compressed to ruin.

The Order That Works

  1. Keep the original somewhere safe.
  2. Resize to the dimensions the image will be shown at.
  3. Choose the format for the kind of image it is.
  4. Compress at a quality in the 70 to 85 range, or to a target size.
  5. Compare with the original, and adjust once.

Doing these in order matters. Compressing first and resizing afterwards saves the image twice, and each lossy save removes a little more.

Frequently Asked Questions

Can I compress an image without losing any quality at all?

With PNG, yes: lossless recompression keeps every pixel. With JPG, WebP and AVIF, some detail is always discarded, but at sensible settings the loss cannot be seen, which is the practical meaning of “without losing quality”.

Why did my file get bigger after compressing?

It was probably already compressed harder than your new setting, or it was converted to a format that suits it less well, such as a photo to PNG. A good compressor notices this and hands back the original instead.

Does compressing change the width and height?

No. Compression reduces the file size only. Changing the dimensions is resizing, a separate step, and usually the more effective one.

How small should images on a web page be?

As a working rule, most content images can be under 200 KB and a large hero image under 400 KB, at dimensions matched to how they are displayed. The right test is not a number, though: it is whether the page feels fast on a phone connection.

Ready to Remove Backgrounds?

Try ImageBulk free — 10 credits, no credit card required.

Get Started Free →