Skip to content
FreeToolsPoint — All Free Online Tools

Guides

Image Quality vs File Size: JPG, PNG and WebP

What actually controls how big an image file is, and how to pick a format and a size for photos, screenshots and logos.

The short answer

File size is driven first by pixel count, second by format, and only third by the quality slider. Resizing a 4000-pixel-wide photo down to 1600 pixels removes about five sixths of the pixels before any compression decision is made.

So choose the dimensions you actually need, then pick a format that matches the content — lossy for photographs, lossless for sharp-edged graphics — and treat the slider as a last adjustment.

How much any of this saves depends entirely on the image. A flat-coloured chart and a detailed forest photograph of identical dimensions behave nothing alike under the same settings, which is why the only reliable method is to try a setting and look at the resulting file.

Lossy and lossless compression

Lossless compression stores the exact pixels and finds a shorter way to write them down, much as a ZIP archive does with a document. Decode it and you get every original pixel back, bit for bit. PNG works this way, using prediction filters followed by DEFLATE compression, and it can store an alpha channel for transparency.

Lossy compression throws information away permanently, keeping the parts of the image your eye is most sensitive to and coarsening the rest. JPEG does this by transforming blocks of pixels into frequency coefficients, dividing them by a quantisation table and rounding — the quality setting controls how aggressive that rounding is. It also usually stores colour at lower resolution than brightness, because human vision tolerates that.

WebP supports both modes. Lossy WebP uses block prediction borrowed from video coding; lossless WebP uses its own entropy coding and, unlike JPEG, keeps transparency.

Lossy re-encoding compounds. Each save at a given quality discards a little more, so editing a JPEG repeatedly degrades it even if you never lower the setting. Keep the original and export copies from it.

Why dimensions matter more than the slider

Pixel count grows with the square of the dimensions, so a modest-sounding resize is a large cut.

Pixel counts for the same photograph at different widths, at a 4:3 aspect ratio
Longest sideDimensionsPixelsShare of original
4000 px4000 × 300012,000,000100%
2000 px2000 × 15003,000,00025%
1600 px1600 × 12001,920,00016%
1000 px1000 × 750750,0006.25%

Halving the longest side quarters the pixel count. Those 12 million pixels, stored raw at three bytes each, are 36,000,000 bytes — roughly 34 MiB before any compression at all. Compression shrinks that enormously, but it is still working on six and a quarter times fewer pixels after a resize to 1600, and no quality slider gives you a comparable reduction without visible damage.

The practical question is how large the image will be displayed. An image shown in a 800-pixel-wide column does not need to be 4000 pixels wide; around 1600 covers high-density screens at that size. Anything beyond that is bytes the visitor downloads and throws away.

Choosing a format by content

What each format is good at
ContentSensible choiceWhy
Photograph, continuous toneJPEG or lossy WebPGradual detail hides the rounding that lossy coding introduces.
Screenshot of text or an interfacePNG or lossless WebPSharp edges and flat areas compress well losslessly; lossy coding leaves haloes around letters.
Logo or icon with transparencyPNG or WebPJPEG has no alpha channel, so transparent pixels become a solid colour.
Chart or diagram, few coloursPNG, or SVG if you have the sourceLarge flat regions are exactly what lossless filtering handles well.
Scanned documentPNG for legibility, JPEG for bulkText edges suffer under lossy coding; photographic paper texture does not.

Three signs you have picked the wrong format

  • A screenshot of text saved as JPEG shows faint grey smears beside the letters. That is ringing from block-based lossy coding.
  • A photograph saved as PNG comes out larger than the original JPEG. Lossless coding cannot exploit the redundancy that photographic noise destroys.
  • A logo saved as JPEG gains a black or white background. The alpha channel was discarded during conversion.

Should everything be WebP?

WebP is supported by all current mainstream browsers and generally gives smaller files than JPEG or PNG for the same perceived quality, but "generally" is doing real work in that sentence — on some images the older format wins. It is also less convenient outside the browser: some desktop software, email clients and older operating systems still handle it poorly. If a file is going to a colleague rather than onto a web page, JPEG or PNG is the safer attachment.

Common mistakes

  • Dropping the quality slider instead of resizing. Low quality at full dimensions looks worse and often saves less than full quality at sensible dimensions.
  • Expecting a quality setting to do anything to a PNG. PNG is lossless; the quality value is ignored when the output is PNG, and only the dimensions change the result.
  • Converting a JPEG to PNG to "improve" it. The detail was already discarded. You get a bigger file containing the same damage.
  • Re-saving the same lossy file repeatedly. Losses accumulate with each pass. Always export from the original.
  • Comparing settings on a zoomed-out thumbnail. Judge at the size the image will actually be shown, or at 100%.
  • Trusting a percentage you read somewhere. Savings quoted for someone else's test image say nothing about yours. Measure your own files.
  • Forgetting the metadata. Re-encoding an image drops embedded EXIF data such as camera settings, timestamps and GPS coordinates. That is often welcome before publishing, but it is irreversible, so keep the original if you need that information.

Check it yourself

The image compressor on this site does the whole job in your browser — the files are read locally and nothing is uploaded to a server. It gives you four controls that map directly onto everything above:

  1. Quality sets the initial encoder quality, so 80% on the slider means 0.8 passed to the encoder. It affects lossy output only.
  2. Max width/height caps the longest side in pixels and is the control that does most of the work on an oversized photo.
  3. Format keeps the input type on "auto", or re-encodes to JPEG, PNG or WebP. Converting to JPEG discards any transparency.
  4. Target size in KB is optional, accepts 1 to 100,000, and makes a second compression pass aimed at that ceiling; the smaller of the two results is kept.

Each finished file shows its original and output size in KB, and says plainly whether a target was met or not — so you can compare two settings on your own image instead of guessing. Several files can be processed at once and downloaded individually or as a single ZIP.

Related tools and guides

Reviewed October 1, 2026. Calculation methods and corrections.