Why Does Saving a JPEG Repeatedly Reduce Its Quality?

Introduction

JPEG images are everywhere: on phones, social media, websites, and photo libraries. A common annoyance is that a JPEG image slowly loses detail and looks worse each time you save it. This article explains exactly why that happens, in plain English, and shows the technical reasons, practical examples, and simple ways to avoid or reduce the problem.

What is a JPEG and how does it store images?

JPEG stands for Joint Photographic Experts Group, the committee that created the standard. It’s a file format that compresses photographic images to save storage space. The core idea is lossy compression: the file discards some image information to make the file smaller.

When you first save a photograph as a JPEG, software analyzes the image and removes details that are judged less important for human vision. The result is smaller files but not a perfect copy of the original. How much information is thrown away depends on the quality setting used when saving.

Lossy compression: the main reason quality drops

Lossy compression reduces data by approximating parts of the image instead of keeping exact original values. JPEG uses several steps to do this, including color-space conversion, blocking, frequency transformation (Discrete Cosine Transform or DCT), quantization, and entropy coding. The key lossy step is quantization, which rounds many numbers and discards small details.

Because quantization is irreversible, once details are discarded they cannot be recovered. That means every time you save a JPEG using lossy compression, additional small differences are introduced. Repeated saves compound those differences, producing visible defects like blurring and blocky artifacts.

What happens when you save a JPEG again?

When you open an existing JPEG and save it again as a JPEG, the image goes through the same compression steps again. The already-approximated pixel values are re-analyzed and quantized anew. Each re-compression can introduce further rounding errors and amplify compression artifacts that were subtle in prior versions.

Think of it like making a photocopy of a photocopy: each copy loses a bit more sharpness and contrast. In JPEG terms, the quantization tables and rounding during compression are what cause that progressive loss.

Concrete examples of visible degradation

Here are the most common artifacts that appear after repeated JPEG saves:

Blurring: Fine texture and sharp edges become softer because higher-frequency detail is removed during quantization.

Blocking: JPEG divides an image into 8×8 pixel blocks for processing. After aggressive or repeated compression, the boundaries between those blocks can become visible as a grid of darker and lighter squares.

Ringing and halos: Around high-contrast edges (like text or telephone wires against the sky) you may see faint echoes or light/dark bands caused by how frequency components are approximated.

Color banding: Smooth gradients, such as a sunset sky, can become segmented into visible bands instead of a smooth transition because subtle color values were removed.

How JPEG compression works (plain-language steps)

To understand why repeated saves worsen quality, it’s helpful to know the main JPEG steps in simple terms:

1. Color conversion: The image is converted from RGB (red, green, blue) to a format separating brightness (luma) from color (chroma). Human vision is less sensitive to fine color details, so chroma can be compressed more.

2. Blocking: The image is split into small blocks (usually 8×8 pixels). Processing smaller blocks makes the math manageable and predictable, but introduces the potential for blocky artifacts.

3. Frequency transform: Each block is converted into a set of frequency components using the Discrete Cosine Transform (DCT). Low frequencies represent broad smooth areas; high frequencies represent fine details and textures.

4. Quantization (lossy step): The DCT coefficients are divided by values from a quantization table and rounded. Small high-frequency coefficients often become zero, effectively discarding that detail.

5. Entropy coding: The quantized coefficients are compressed using efficient lossless coding (e.g., Huffman coding) to produce the final JPEG file.

When you re-save a JPEG, the file is decompressed back to pixel values, then those pixels undergo the same sequence again. Since quantization already removed detail, the second compression is performed on a degraded image and typically removes or alters different coefficients, leading to cumulative loss.

Why some JPEGs survive multiple saves better than others

Not all repeated JPEG saves produce the same visible harm. Several factors affect how quickly quality declines:

Compression quality setting: Higher quality (larger files) uses milder quantization, preserving more detail. Saving at a high quality setting reduces the visible effect of repeated saves.

Image content: Smooth images like portraits or skies show banding and blurring more readily. Highly textured images may hide some artifacts but can still lose fine detail.

Editing operations: Repeatedly editing pixels (cropping, resizing, color adjustments) and then saving increases the chance of noticeable degradation. Simple open-and-save cycles also degrade images, but visible harm is accelerated when edits alter edges and contrasts.

Software and encoder details: Different image editors and camera firmware use different quantization tables and compression implementations. Some encoders are optimized to preserve visually important details better than others.

Alternative formats and workflows to prevent quality loss

If you plan to edit an image multiple times or store a master copy, consider these safer options:

Use a lossless format for the master file: Formats such as TIFF, PNG, or raw camera files store image data without lossy compression. They keep every pixel intact, so repeated saves do not reduce quality.

Work in the highest-quality JPEG or a lossless intermediate: If storage is limited, keep an original high-quality JPEG or export a lossless intermediate while editing. Only export to a lossy JPEG once, as the final step for distribution.

Use non-destructive editing: Many photo applications (Lightroom, Capture One, some phone gallery apps) store edits as instructions (metadata) and do not re-encode pixels until you export a final image. This keeps the master unchanged.

Choose a higher JPEG quality when exporting: If you must use JPEG, select a high quality (lower compression) and avoid multiple save cycles. Larger file sizes but fewer visible artifacts result.

When repeated saving is unavoidable: practical tips

If you cannot avoid saving as JPEG multiple times, these practical steps reduce damage:

Minimize re-encodes: Open and export once whenever possible. Do all edits in a single session, then save the final JPEG.

Keep a copy of the original: Store an untouched original (lossless or high-quality JPEG) separately. This lets you re-edit the original later without cumulative losses.

Avoid repeatedly resampling: If you resize an image, do it in steps that minimize repeated resampling. Ideally, resize once from the original master.

Use higher quality settings: When saving, move the quality slider toward higher values. The visual difference often justifies the extra file size.

Special cases: progressive JPEGs, chroma subsampling, and recompression tools

Progressive JPEGs store image data in multiple scans so a low-resolution preview appears quickly in browsers and then refines. Progressive encoding is still lossy and will suffer from repeated saves in the same way, though the visual artifacts behave similarly.

Chroma subsampling reduces color resolution because human vision is less sensitive to color detail than brightness. Common subsampling (like 4:2:0) helps reduce file size but can amplify color banding after repeated recompression.

Some modern tools (e.g., JPEG recompressors or “smart” save features) can recompress JPEGs without decoding to full pixels, or try to preserve certain coefficients to reduce quality loss. These tools are limited in scope and cannot restore data lost by earlier quantization steps, but they may produce better-looking recompressed files in specific cases.

Why formats like PNG or HEIF behave differently

PNG is lossless for photographic images (though it compresses less effectively on photos than on graphics). Saving repeatedly as PNG does not degrade quality because no pixel data is discarded. PNG is ideal for images with sharp edges or text but produces larger files for complex photographs.

HEIF/HEIC and newer codecs (like AVIF) can offer better compression efficiency and improved perceptual quality at the same file size compared to JPEG. They use more advanced transforms and quantization strategies, so repeated saves may behave differently, but if used in lossy mode they still discard data and can degrade with repeated saves.

Summary of causes and practical implications

Repeatedly saving a JPEG reduces quality because the JPEG format uses lossy compression that discards image information during quantization. Each re-save typically recompresses already-approximated pixels, accumulating rounding errors and visible artifacts like blurring, blocking, and banding.

To avoid or reduce the problem: keep a lossless master, use non-destructive editing, export to JPEG only once at a high quality setting, or choose a more modern format when appropriate. These steps help retain image detail for archiving, printing, or high-quality publishing.

Conclusion

Saving a JPEG repeatedly makes it look worse because JPEG compression permanently removes certain image details. The loss is cumulative: each time the image is recompressed those approximations are altered further, producing visible artifacts. Understanding the JPEG process and adopting workflows that preserve a lossless original or limit re-encoding will keep your photos looking sharper and more natural over time.