ScreenshotNeo

BlogGuides

JPEG Compression Explained: Why Repeated Saves Reduce Image Quality

JPEG saves discard image data, so repeated exports can add artifacts. Learn how to edit JPEGs while preserving the best available original.

By the ScreenshotNeo team4 October 20267 min read

JPEG is a lossy image format: each ordinary JPEG export can discard some image data to make the file smaller. If you open an already compressed JPEG, edit it, and export it as JPEG again, the new encoding starts from the reconstructed image and can add more artifacts. Keep the best original or a lossless working copy, then export JPEG once for delivery.

Simply copying a JPEG file does not recompress it. Viewing it does not reduce its quality either. The quality risk is another lossy JPEG encode, and the amount of visible change depends on the image, editor, settings, and edits; there is no universal number of saves after which a JPEG becomes visibly degraded.

1. What JPEG compression does

JPEG reduces file size by representing image information with less precision. It uses the discrete cosine transform, which changes spatial resolution and pixel intensity values. A high quality setting can reduce visible damage, but ordinary JPEG encoding remains lossy. The U.S. HHS Office of Research Integrity describes the tradeoff and recommends treating JPEG as a final step when image-data integrity matters (HHS guidance on lossy compression).

When an editor opens a JPEG, it decodes the compressed data into pixels. An export to JPEG encodes those pixels again. That new encoding cannot refer to the detail discarded in an earlier encode; it only sees the decoded image and any edits. Repeating this cycle can accumulate changes such as blockiness, ringing around edges, smearing of fine texture, and color or tonal shifts.

The visible impact varies. Smooth gradients, fine patterns, text, sharp edges, and images that have already been compressed can make artifacts easier to notice. The sources do not establish a fixed loss per save, so claims such as “every save loses a specific percentage” or “quality becomes unusable after a set number of saves” are not reliable rules.

2. What counts as another JPEG save?

Action Does it add JPEG loss? Why
Copying or renaming the file No The compressed file bytes are copied; no new image encoding happens.
Opening or viewing it No Decoding for display does not rewrite the file.
Editing and exporting as JPEG Usually yes The edited, decoded pixels are encoded as JPEG again.
Saving repeatedly in one editing session Not necessarily the same as repeated reopen-and-export cycles Some editors keep the decoded image in memory during the session. Behavior depends on the editor; see the Wikimedia Commons JPEG guidance.
Exporting as PNG No new JPEG loss in the PNG save PNG is lossless, but it cannot restore detail discarded by earlier JPEG encoding.

For predictable results, do not rely on an editor retaining a pristine decoded source between saves. Preserve a master and create the delivery JPEG from that master.

3. How to edit a JPEG without adding avoidable quality loss

  1. Keep the best available original. Preserve the camera raw file or another original-quality source unchanged, when available.
  2. Make an editable working copy. Use a non-destructive project or a lossless format such as TIFF or PNG if your editor does not preserve the work in its native project format. A lossless working file prevents additional lossy JPEG encoding during intermediate saves.
  3. Complete your edits in the working copy. Keep adjustment layers or other editable information if the application supports them. Avoid using an exported JPEG as the new master.
  4. Export one JPEG for delivery. Choose settings for the intended use and keep the working master for future changes.
  5. If only a JPEG remains, preserve it first. Duplicate that best copy, perform the edits, and avoid unnecessary JPEG generations. Converting it to PNG can prevent new JPEG loss during later PNG saves, but it cannot recover prior losses.

Lossless JPEG operations exist for limited transformations, such as some 90-degree rotations or block-aligned crops. They have constraints; arbitrary crops, resizes, retouching, and other edits should not be assumed lossless. Check the editor’s documentation and retain the source.

4. JPEG versus PNG, TIFF, and JPEG XL for a working file

Format or workflow Useful for Limit to understand
JPEG export Delivery where JPEG compatibility and smaller files matter Ordinary JPEG encoding is lossy, including at high quality settings.
PNG working copy Keeping subsequent saves lossless, especially for graphics or when already using PNG A PNG made from a JPEG preserves the JPEG’s current decoded pixels; it does not restore missing detail.
TIFF or native editable project Retaining a high-quality or editable working version File size and application support vary. Confirm the chosen mode and compression settings are lossless if integrity is required.
JPEG XL lossless transcoding Storing an existing JPEG in JPEG XL with the ability to restore the exact original JPEG file This preserves the existing JPEG file; it does not recover image information discarded before transcoding. Confirm application and device support.

The JPEG committee describes JPEG XL as supporting lossless recompression of existing JPEG files, which can be restored to the exact same JPEG file (JPEG XL overview). That is lossless file transcoding, not repair of earlier lossy encoding.

5. Choosing export settings and managing file size

Export controls differ across editors, so there is no single quality number that maps consistently between applications. Use a copy of the master and judge the result at the size and display context where it will be used. Check fine edges, small text, gradients, texture, and saturated color areas. Compare the exported file with the master, and avoid repeatedly lowering quality to chase a smaller size.

  • For archival or future editing, retain the raw, lossless, or native editable master rather than relying on a delivery JPEG.
  • For web or email delivery, balance file size against visible quality for the intended dimensions and audience.
  • For scientific, measurement, or industrial image processing, lossy compression can discard information relevant to later analysis. Follow the project’s preservation and acquisition requirements; the HHS image guideline explains this concern.
  • Keep the original separate from temporary exports so a mistaken overwrite does not become the only copy.

6. Troubleshooting common JPEG quality problems

Symptom Likely cause What to do
The image looks blurrier after several edits It was repeatedly exported to JPEG, or resized and compressed along the way. Return to the raw, lossless, or best available master and repeat the edits. If none exists, use the highest-quality remaining copy and avoid further JPEG exports.
Text or edges show halos or blocks Lossy encoding artifacts are visible around high-contrast detail. Export once from the master using a less aggressive setting; inspect at actual display size. Do not expect a PNG conversion to remove existing artifacts.
A PNG version is not sharper than the JPEG PNG preserved the decoded JPEG image, including its existing artifacts. Use an earlier original if available. PNG only prevents additional JPEG encoding loss in later PNG saves.
A rotation or crop changed the image The operation may not have been a constrained lossless JPEG transform, or the editor re-encoded the image. Use the original or a lossless working copy. Treat lossless JPEG transforms as operation-specific and verify their constraints.
Different apps produce different results at the same quality number Quality controls and encoders are application-specific. Compare output visually and by file size using copies of the same master; do not assume numeric settings are equivalent.

7. A practical preservation checklist

  • Keep the raw or best-quality original unchanged.
  • Use a lossless or editable working format for intermediate edits.
  • Do not mistake copying, viewing, or renaming for recompression.
  • Export JPEG at the end when JPEG delivery is needed.
  • Keep the master so a future edit does not start from the delivery JPEG.
  • For JPEG XL, distinguish exact restoration of the JPEG file from recovery of image detail lost in earlier JPEG encoding.

8. FAQ

Does saving a JPEG again reduce quality?

An ordinary new JPEG export can add lossy changes. A byte-for-byte copy or a view does not.

Does converting JPEG to PNG restore quality?

No. It prevents further JPEG compression in subsequent PNG saves, but it cannot bring back information already discarded.

Can I make a JPEG lossless by selecting maximum quality?

No. A high quality setting may reduce visible artifacts, but ordinary JPEG remains lossy.

Can JPEG XL recover details lost in earlier JPEG saves?

No. Its lossless transcoding can preserve and restore the existing JPEG file exactly; it does not reconstruct detail absent from that file.

9. Or skip the browser setup

If your task is capturing a webpage image, you can use a screenshot API instead of setting up a browser capture workflow. ScreenshotNeo is a website screenshot API and MCP server from ScreenshotNeo. It returns PNG, JPEG, WebP, or PDF from one GET request. Its API options include image resizing, custom CSS and JavaScript, viewport and device presets, full-page capture, and element capture. See the ScreenshotNeo API documentation.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
  • Cookie banners are accepted and removed before capture; 60+ known consent platforms, newsletter popups, and chat widgets can be removed, and each step can be turned off.
  • Bot checks, blank pages, timeouts, failed loads, and cache hits cost nothing. Response headers identify the page verdict and whether it was billed.
  • An MCP server provides take_screenshot, get_page_info, and capture_pdf tools for AI agents and MCP clients.
  • The free plan includes 1,000 screenshots per month with no card. Paid plans start at $5 for 3,000 screenshots; every feature is on every plan.

Sign up for 1,000 free screenshots a month, with no card.