Skip to content

How to Compress Images Without Visibly Losing Quality

Most oversized images are not a compression problem at all. They are too many pixels saved in the wrong format. This guide explains what compression does to a file, the order of operations that gets the biggest savings, and how to find the lowest setting that still looks clean.

Why file size matters

  • Web pages. Images are usually the heaviest part of a page. Smaller files load faster, especially on mobile data, and page speed feeds into how search engines rate a site.
  • Upload and attachment limits. Email providers, job portals, forms and marketplaces cap file sizes. A photo straight off a modern phone can exceed them.
  • Storage and sharing. A folder of right-sized images is faster to back up, sync and send.

What compression actually does

JPEG: simplifying 8×8 blocks

A JPEG encoder first separates brightness from color and usually stores color at reduced resolution, because the eye is far more sensitive to brightness detail. It then cuts the image into 8×8 pixel blocks and rewrites each block as a mix of simple wave patterns, from smooth to fine. Quantization is the lossy step: the encoder rounds the fine patterns coarsely, often to zero, since they carry detail you are least likely to notice. The quality setting controls how coarse that rounding is. Push it too far and the block grid shows through as blockiness in skies, and sharp edges pick up ringing “mosquito noise.”

WebP: smarter prediction

Lossy WebP predicts each block from its already-decoded neighbors and only stores the difference, then quantizes that. It also includes a filter that smooths block boundaries. The result is usually a smaller file than JPEG at similar visual quality, and when it fails it tends to look soft rather than blocky. WebP also has a separate lossless mode.

PNG: lossless, with a palette option

PNG never discards anything. It predicts each pixel from its neighbors and compresses the remainder with the same algorithm ZIP uses. That works brilliantly on flat colors and poorly on photos, where sensor noise makes every pixel slightly unpredictable. Tools that make tiny PNGs usually reduce the image to a palette of 256 colors or fewer (“PNG-8”) before compressing, which is itself a lossy step. Photoyam’s Compress tool can do this too: its PNG colors setting reduces a PNG to 256, 128, 64 or 32 colors, which suits logos, icons and screenshots with flat areas. A photo reduced to 256 colors tends to show banding in skies and skin, so for small photo files JPEG or WebP is still the better choice.

Resize first: pixels dominate file size

File size scales roughly with the number of pixels, and pixel count grows with the square of the dimensions. Halve the width and height of a 4,000 × 3,000 photo and you keep 2,000 × 1,500, only a quarter of the pixels. No quality slider can find savings that large without visible damage.

So start by asking how big the image will actually be displayed. A blog column might be 800 pixels wide; a full-width hero image rarely needs more than about 2,000 pixels, which already covers high-density screens at typical widths. Anything beyond the display size is downloaded and then thrown away by the browser. See our social media image sizes guide for common targets.

The quickest way is the Shrink large images option in the Compress tool, which resizes and compresses in one pass (see the steps below). In the Photoyam Pro editor, Image › Image Size… (Ctrl+Alt+I) resizes the document with Constrain proportions on by default and Bicubic (smooth) resampling, which is the right choice for photos. Its Resolution (pixels/inch) field only changes the print size stored in the file; for the web, the pixel dimensions are what count.

Photoyam’s Image Size dialog in the Pro editor over a lighthouse photo: Dimensions 1500 × 1000 px, Width and Height, Units Pixels, checked Constrain proportions and Scale styles, Resolution 72 pixels/inch, the Print size readout and Resample set to Bicubic (smooth).
The Image Size dialog. With Constrain proportions checked, typing a new Width updates Height to match, so the photo is not stretched.

Finding the quality sweet spot

Quality settings do not scale evenly. From 100 down to about 90, the file shrinks a lot with no visible change. Through the 80s and 70s it keeps shrinking and most photos still look clean. Below that, savings get smaller while artifacts get easier to see. That is why JPEG quality around 75 to 85 is common practice for web photos.

Adjust from there based on the content:

  • Busy, textured photos (foliage, gravel, crowds) hide artifacts well and tolerate lower settings.
  • Smooth gradients (skies, studio backdrops, skin) show banding and blocks first. Keep quality higher.
  • Text, UI and line art show ringing around every edge. Use PNG or lossless WebP instead of lossy.
  • Thumbnails are small on screen, so artifacts are hard to see. Lower quality is usually fine.

Also avoid re-compressing a file that is already a JPEG at low quality. Each lossy save adds a new round of damage, so start from the best original you have.

Compress an image in Photoyam

The Compress tool works right on its page: add your images and each one is compressed in your browser as soon as it loads, with a before-and-after view of the result. Nothing is uploaded.

  1. Add your images. On the Compress page, choose images or drop files anywhere on the page. You can add up to 50 at once, and more later with Add images. Each file is compressed straight away with the default settings.
  2. Pick a format. Under Compression, the Format menu starts on Same as original, so a JPG stays a JPG. Switch to WebP or JPG to shrink a photo that arrived as PNG, keep PNG for graphics and transparency, or try AVIF if your browser can encode it (the option is greyed out when it cannot).
  3. Set Quality, or aim for a file size. For JPG, WebP and AVIF, drag Quality (it starts at 80). If an upload form has a hard limit, tick Aim for a file size and enter a Target size (KB) instead: the tool searches for the highest quality that fits and tells you which one it used, or warns you when even the lowest quality is too big. For PNG, choose PNG colors: 256, 128, 64 or 32 colors make a far smaller file, while All (lossless) keeps every pixel exact.
  4. Shrink oversized images. Under Dimensions, tick Shrink large images and set Max width (px) and Max height (px) (both start at 1920). Larger images are scaled down to fit inside that box with their proportions kept; smaller ones are left alone.
  5. Compare and download. Drag the divider across the Original and Result views to compare, and read the size line under them (for example 601 KB → 165 KB, −72%). Then click Download, which names the format and size, or Download all (ZIP) when you added several files. If compressing would make a file bigger in the same format, you get the original back instead.
A Pomeranian and a tabby cat on a colourful sofa. A magnifier over the cat's eye shows the original and the compressed photo side by side, looking the same; the file went from 1.72 MB to 574 KB (−67%).
What the Compress tool did to a 2400 × 1600 JPG at its default settings: 1.72 MB became 574 KB (−67%), and the magnified detail looks the same before and after.

In the Pro editor: the Export button or Save for Web

When the image needs other edits first, click Edit further in the Pro editor on the Compress page (or open it in the editor). The fastest way back out is the blue Export button at the top right of the menu bar: choose JPG or WebP, drag Quality (85 the first time; after that it remembers your last setting) and, if the picture is bigger than it will be shown, set Size to 75%, 50% or 25% or type a Custom width. Its estimated size is a real encode too. In our test on a 1200 × 800 image, halving the size cut a quality-85 JPG from 84.1 KB to 19.5 KB, far more than any quality change did. The guide to saving and exporting walks through the sheet.

For exact pixel dimensions, use File › Save for Web… instead, or click More options… in the Export sheet. Opened from the menu it starts on PNG the first time, then on the format you used last; File › Export As › JPG or WebP opens the same dialog with that format already chosen. For JPEG and WebP a Quality slider appears, starting at 90 until you change it. Width and Height set the exported size, with Constrain proportions on by default so typing one updates the other, or you can enter a Percent. Estimated size shows the real result: Photoyam re-encodes the image a moment after each change. Click Export to download; your open document is not changed, so you can export again at other settings and compare.

Photoyam’s Save for Web dialog over a lighthouse photo, set to JPEG at Quality 90, with Width 1500, Height 1000, Percent 100, Constrain proportions ticked and an Estimated size of 329.2 KB above the Cancel and Export buttons.
Save for Web in the Pro editor. The Estimated size comes from a real encode at the current settings, so lowering Quality or Width shows its effect on the file before you click Export.

Checking the result at 100%

Artifacts hide when an image is scaled down to fit the screen, because shrinking averages neighboring pixels together. To judge compression honestly, look at the file at 100%, where one image pixel equals one screen pixel.

  1. Open the exported file in the Pro editor with File › Open….
  2. Choose View › Actual Pixels (100%) (Ctrl+Alt+0), or click 100% in the status bar at the bottom of the window.
  3. Look where problems appear first: skies and other smooth gradients (banding, blocks), high-contrast edges and text (ringing), and saturated reds and blues (smeared color edges).
  4. If you see artifacts, export again one step higher in quality. If it looks clean, try one step lower and compare.

Common mistakes

  • Compressing before resizing. You spend quality on pixels nobody will see. Resize to the display size first.
  • Saving photos as PNG. The file stays huge because lossless compression cannot remove noise.
  • Saving screenshots as low-quality JPEG. Text becomes fuzzy with gray halos. Use PNG or lossless WebP.
  • Judging on a fit-to-screen view. Downscaling hides artifacts. Check at 100%.
  • Overwriting the original. Keep the full-size original; compression is a one-way trip.
  • Distorting while resizing. Keep Constrain proportions ticked in Image Size and Save for Web (it is on by default); untick it only when you really want to stretch the picture.

Quick checklist

Compression checklist by image type
Image typeFormatStarting qualityCheck for
Web photoWebP or JPEGAbout 75–85Banding in skies, blocks in shadows
Portrait or productWebP or JPEGAbout 80–90Smearing on skin and smooth backdrops
ThumbnailWebP or JPEGAbout 70–80Muddy detail at display size
Screenshot or diagramPNGLosslessFile size; if huge, check for a photo inside
Logo or cut-outPNG or WebPLossless or highClean transparent edges

Before any of these: resize to the display size, keep the original, and look at the result at 100% before you publish it.

Try it in Photoyam

Compress up to 50 images at once with a before-and-after view, an optional target file size, PNG color reduction and a maximum width and height, then download them one by one or as a ZIP. Free, no sign-up, and nothing is uploaded.

FAQ

What quality setting should I use for JPG?

For web photos, a setting in the 75 to 85 range is common practice and usually looks clean. Go higher for images with fine gradients or text, and lower only for thumbnails. Always confirm by viewing the result at 100% zoom, because the number means different things in different apps.

Why is my PNG so large?

PNG is lossless, so it must keep every bit of noise and texture in a photo. That makes photographic PNGs many times larger than a JPG or WebP of the same picture. Use PNG for screenshots, logos and transparent graphics, and JPG or WebP for photos.

Is the estimated size in Save for Web exact?

Photoyam produces the estimate by actually encoding the image with your current format, quality and dimensions, so it closely matches the file you will get. It updates a moment after you stop changing a setting.

Can I compress many images at once?

Yes. The Compress tool at /compress takes up to 50 images at a time and applies the same settings to all of them. Tick Shrink large images to scale oversized ones down to a maximum width and height in the same pass, then click Download all (ZIP).