Image Compression Explained: Lossy vs Lossless (and How to Shrink Photos Without Ruining Them)

Image Compression Explained: Lossy vs Lossless (and How to Shrink Photos Without Ruining Them) — Preslo guide cover with the Image Compressor tool

A photo straight from a modern phone can easily be several megabytes, which is far more than a website, an email or a chat message needs. Image compression is how that size comes down, and done well, nobody looking at the picture can tell. Done badly, you get blotchy skies, smeared faces and blocky text. This guide explains what is really happening when an image is compressed, so you can make smart choices instead of guessing.

Two ways to make an image file smaller

Every digital image is a grid of pixels, and each pixel holds a color. The size of the file depends on two things:

  1. How many pixels there are. This is the image's resolution, such as 4000 × 3000 pixels.
  2. How efficiently those pixels are stored. This is where compression comes in.

Most people focus only on the second, adjusting a quality slider and hoping for the best. In practice, reducing the number of pixels is often the biggest and least visible saving of all. We will come back to that after looking at the two kinds of compression.

Lossless compression: smaller, but identical

Lossless compression shrinks a file without changing a single pixel. When the image is opened, it is rebuilt exactly as it was. It works a bit like writing "20 blue pixels" instead of "blue, blue, blue..." twenty times: it looks for repetition and patterns and describes them more briefly.

PNG is the best-known lossless format, and WebP also has a lossless mode. Lossless compression is excellent for images with large areas of identical color, such as screenshots, logos, charts and diagrams. It is also the right choice for images you will keep editing, because saving them again never degrades them.

The limitation is that there is only so much repetition to find. A photograph of grass, hair or a crowd has almost no two pixels exactly alike, so lossless compression cannot shrink it very much.

Lossy compression: smaller by letting go of detail

Lossy compression gets much smaller files by permanently discarding information. JPG and lossy WebP both work this way. They take advantage of how human vision works: we are much more sensitive to changes in brightness than to small changes in color, and we notice broad shapes far more than tiny, high-frequency detail. The encoder simplifies exactly those things we are least likely to miss.

At moderate settings the result looks practically the same as the original. Push it too far and the simplification becomes visible. Common signs of over-compression include:

  • Blocking: visible squares, especially in smooth areas like skies and walls.
  • Banding: smooth gradients turning into visible steps of color.
  • Ringing: faint halos or "mosquito noise" around sharp edges and text.
  • Smearing: fine textures like fabric, foliage or skin looking waxy.

Because information is thrown away, lossy compression is a one-way trip. Re-compressing an already compressed file loses a little more each time, so always start from your original.

What the quality number really means

Most tools describe lossy compression with a quality value, often from 0 to 100. It is tempting to read this as a percentage of the original quality, but it is not. It is a setting that tells the encoder how aggressively to simplify the image. A quality of 70 does not mean the photo looks "70% as good"; for most photos it looks very close to the original while being dramatically smaller.

The scale is also not standard between programs. Quality 80 in one app may not match quality 80 in another. As a rough guide for typical encoders:

  • 85 to 95: differences are very hard to see. Good for photos you may print or edit later.
  • 70 to 85: a large saving with little visible change in most photos. A good everyday range for the web and email.
  • 50 to 70: clearly smaller files, with softening that may show in fine detail and gradients.
  • Below 50: artifacts become easy to spot. Use only when size is critical.

Above about 95, file size often climbs steeply for very little visible benefit.

Resolution: the saving most people overlook

File size is closely tied to the number of pixels, and the number of pixels grows with the square of the dimensions. Halve both the width and the height and you are left with only a quarter of the pixels. Here is what that looks like for a typical 12-megapixel phone photo:

Dimensions (pixels)Total pixelsShare of the original
4000 × 300012.0 million100%
2560 × 19204.9 millionabout 41%
1920 × 14402.8 millionabout 23%
1280 × 9601.2 millionabout 10%
800 × 6000.5 million4%

Most laptop and monitor screens are around 1920 pixels wide or less, and a photo in an email or chat is usually shown much smaller than that. Sending a 4000-pixel image means the viewer's device downloads all those pixels only to shrink them for display. Resizing first gives you a much smaller file before quality settings even come into play, and it usually looks just as sharp on screen.

Practical targets for common uses

There is no single correct setting, but these starting points work well for most photos. Adjust after checking the result.

UseLongest sideFormatQuality
Full-width website image1920 to 2560 pxWebP or JPG70 to 80
Image within a blog post or article1200 to 1600 pxWebP or JPG70 to 80
Email attachment for viewing on screen1600 to 2000 pxJPG75 to 85
Upload forms with a strict size limit1024 to 1600 pxJPG60 to 75
Photos to print or archiveOriginalJPG90 or higher
Screenshots and graphicsOriginal or slightly smallerPNG or WebPLossless

Preslo's Image Compressor is built around these ideas. It offers three levels, Light (quality 85), Recommended (70) and Strong (50), lets you save as JPG, WebP or PNG, and has an optional maximum width or height from 800 to 3840 pixels. It shows the original and new sizes side by side, and if the result would not be smaller, it says so and gives you the original instead. For exact pixel dimensions, the Image Resizer lets you type any width and height.

Why a photo saved as PNG is so large

A common surprise is a single photo saved as PNG that weighs 10 MB or more. This happens because PNG insists on keeping every pixel exactly, and photographs are full of tiny, random variations in color that lossless compression cannot summarise. Screenshots taken on phones and computers are often saved as PNG by default, so photos that pass through a screenshot, an editing app or a copy-and-paste can end up in this format by accident.

Applying a "quality" setting to a PNG does nothing, because there is no lossy step to adjust. To make a PNG photo smaller you have three honest choices: convert it to JPG (transparency becomes a solid color), convert it to WebP (transparency is kept), or keep it as PNG and reduce its dimensions. The Image Format Converter handles the format change if you want full control over the quality value.

Metadata: the hidden part of the file

Besides pixels, most photos carry metadata, usually in a section called EXIF. It can include the camera or phone model, the date and time, exposure settings and, if location services were on, the GPS coordinates where the photo was taken. Metadata is usually only a small part of the file size, but it can matter for privacy: sharing a photo taken at home could reveal where you live.

Many online platforms remove some metadata when you upload, but not all do, and email attachments keep whatever the file contains. Browser-based compression usually drops EXIF data because the image is redrawn and saved fresh; Preslo's compressor does this, and it processes the photo on your device rather than uploading it. One side effect worth knowing: if a tool strips metadata without first applying the orientation note that phones store, a photo can appear sideways, so check the result.

A simple workflow that protects quality

  1. Keep the original file somewhere safe and never overwrite it.
  2. Decide where the image is going and how large it will be displayed.
  3. Resize to fit that use, rather than sending full camera resolution.
  4. Choose the format: JPG or WebP for photos, PNG or WebP for graphics and screenshots.
  5. Start around quality 70 to 80, then compare with the original at 100% zoom.
  6. If you see artifacts, raise the quality; if the file is still too big, reduce the dimensions further.

Key takeaways

  • Lossless compression keeps every pixel; lossy compression discards detail you are unlikely to notice.
  • Reducing resolution is often the largest and least visible saving, because pixel count falls with the square of the dimensions.
  • Quality 70 to 85 suits most photos for screens; the number is a setting, not a percentage of quality.
  • Photos saved as PNG are huge; convert them to JPG or WebP, or reduce their dimensions.
  • Re-compressing a lossy file loses more detail each time, so always work from the original.
  • Check whether your photos carry location data before sharing them.

Frequently asked questions

What quality setting should I use for website photos?

A quality between about 70 and 80, combined with resizing to the size the image is actually shown, works well for most photos. Compare the result with the original and adjust if you notice artifacts.

Does compressing an image reduce its resolution?

Not by itself. Quality settings change how pixels are stored, while resolution changes how many pixels there are. Many tools let you do both, and doing both gives the smallest files.

Can I undo lossy compression?

No. The discarded detail is gone for good, and converting to a lossless format will not bring it back. Keep your original file so you can compress again with different settings.

Is it safe to compress the same image several times?

For lossy formats such as JPG, each new compression removes a little more detail. It is better to compress once from the original with the settings you need.

Will compressing a photo remove its GPS location?

It depends on the tool. Tools that redraw the image in the browser, like Preslo's Image Compressor, generally do not copy EXIF data into the new file, but some apps keep it, so check if privacy matters.

More guides

See all guides →