JPEGs dominate photo storage because the format discards visual information the human eye is unlikely to notice, shrinking a photo to a fraction of its uncompressed size in a single save. A typical 12-megapixel photo that would occupy roughly 36 MB as raw pixel data lands near 3–5 MB as a high-quality JPEG. Smaller files mean cheaper storage, faster transfers, and easier sharing. That trade-off between size and fidelity is the whole story of why JPEGs are popular for saving photos and what happens to the file size each time you hit save.

How JPEG compression actually works

JPEG does not store a grid of colored pixels. It converts the image from red-green-blue channels into one brightness channel (luma) and two color channels (chroma). Human vision resolves brightness detail far more sharply than color detail, so the encoder can throw away most chroma information with little perceived loss. This is called chroma subsampling, and common settings reduce color resolution to half or a quarter of the brightness resolution.

Next, the image is divided into 8×8-pixel blocks. Each block passes through a mathematical transform (the discrete cosine transform) that converts spatial patterns into frequency components. Low frequencies carry the broad shapes; high frequencies carry fine texture and sharp edges. A quantization step then divides each frequency by a tunable value and rounds the result. High-frequency values often round to zero and vanish. This quantization table is the dial your quality slider controls.

The surviving numbers are then run through entropy coding, which packs them losslessly. The result is a compact bitstream that a decoder reverses into an approximation of the original. The key point: the discarded data is gone permanently. Saving, editing, and re-saving a JPEG re-runs the whole lossy pipeline on an already-degraded image.

In plain terms, JPEG bets that you will not miss the fine color and texture detail it deletes, and most of the time that bet pays off.

Why the file size drops so sharply: the numbers

The compression ratio depends almost entirely on the quantization step and the image's content. Smooth skies compress dramatically; dense foliage and fine text resist compression because they contain real high-frequency energy.

Consider a 12-megapixel image (4000 × 3000 pixels). Stored as 24-bit RGB with no compression, it needs about 36 MB. At JPEG quality near 90, the same photo typically lands around 3–6 MB, a rough 6:1 to 12:1 reduction. At quality near 50, files commonly fall to 1–2 MB. The size curve is steep at first and flattens as quality climbs, because the last increments of quality preserve high-frequency data that costs many bits.

A useful rule professionals internalize: moving from quality 95 to 85 often halves the file size with almost no visible change, while moving from 85 to 100 can double or triple the size for differences most viewers never see. That asymmetry is why "maximum quality" is rarely the rational default.

Content matters as much as the setting. Two photos saved at identical quality settings can differ in size by a factor of three or more depending on how much fine detail and noise they contain. Camera sensor noise is especially costly, because the encoder must spend bits reproducing random grain it cannot predict.

A timeline of a single save

Compression happens in a fixed sequence, and each stage determines how much size you lose and how much visible damage you risk.

Stage What happens Size effect
Color transform RGB converted to luma and two chroma channels Neutral; enables the next step
Chroma subsampling Color resolution reduced to half or quarter Large drop with little visible cost
8×8 block transform Pixels converted to frequency coefficients Neutral; reorganizes data
Quantization High-frequency coefficients rounded, often to zero The main size reduction, and the main quality loss
Entropy coding Remaining values packed losslessly Modest further reduction
File write Headers and compressed data stored Final file size fixed

Everything before quantization is reversible. Quantization is the one-way door, and re-saving a JPEG opens it again on data that has already been through it once.

Counterintuitive behavior and edge cases

The most surprising property of JPEG is generational loss. Each open-save cycle re-quantizes the image, and repeated cycles accumulate artifacts even at high quality. A photo edited and saved ten times at quality 90 can look worse than the same photo saved once at quality 75. Professionals edit in a lossless or raw format and export to JPEG only once, at the end.

JPEG also handles certain content poorly. Sharp edges against flat backgrounds, such as text, line art, and screenshots, produce ringing and blocky halos because the encoder cannot represent sudden transitions with few frequency terms. Photographs tolerate compression; diagrams and type do not.

JPEG has no transparency channel and no animation. It also stores only 8 bits per color channel, which limits how much tonal editing a JPEG can survive before banding appears in smooth gradients like skies.

A professional caveat worth stating plainly: "quality 100" in most editors is not lossless. It still quantizes, just gently. Only a different format, such as PNG or a raw file, preserves exact pixel values.

Editing a JPEG across multiple sessions compounds artifacts with every save. Re-saving a screenshot as JPEG blurs text and creates color fringing around letters. Cropping and re-saving at low quality can introduce visible 8×8 block edges. Aggressive compression shows first in smooth gradients as banding, not in busy areas. Exporting at quality 100 does not recover detail already lost in a prior save.

How JPEG compares with the alternatives

Format choice drives file size and capability as much as the quality slider does. The table below reflects typical behavior for photographic content, not absolute guarantees.

Format Compression type Transparency Typical relative size Best use
JPEG Lossy No Baseline Photos for sharing and print
PNG Lossless Yes 2–5× larger than JPEG Graphics, text, screenshots
WebP Lossy or lossless Yes Often 20–35% smaller than JPEG at similar quality Web delivery
HEIC/HEIF Lossy Yes Often roughly half of JPEG at similar quality Phone photo libraries
TIFF Usually lossless Yes Much larger Archival and print workflows
Raw (camera) Effectively uncompressed or lightly compressed Varies Largest Editing with maximum latitude

JPEG remains the universal fallback: every browser, phone, printer, and photo service reads it. Newer formats win on size and features but still rely on JPEG compatibility for the widest reach. That ubiquity, not technical superiority, is a large part of why JPEGs are popular for saving photos.

Practical actions to control JPEG file size

Choose quality by purpose, not by habit. A quality setting near 80–85 is a sound default for web and screen viewing. Quality near 90–95 suits prints and images that will be edited further. Reserve maximum settings for cases where you have verified a visible difference.

Resize before you compress. A 4000-pixel-wide image displayed at 1200 pixels wastes file size on detail no screen will show. Downsampling to the display or print size cuts file size more than any quality slider move.

Strip metadata when size matters, since embedded thumbnails and camera data can add tens to hundreds of kilobytes. Export once from an edited master rather than re-saving the JPEG repeatedly. For screenshots and graphics, switch to PNG or WebP instead of forcing JPEG to encode sharp edges.

Test at the target size. View the exported file at 100% on the screen where it will be seen, not zoomed out in an editor. If you cannot see a difference at normal viewing distance, the extra quality is costing storage for nothing.

Limitations and what JPEG cannot promise

JPEG is a delivery format, not an archive format. Every save is a small loss, and the losses compound. It cannot represent transparency, animation, or more than 8 bits per channel. It degrades gracefully on photographs but visibly on text and line art. Newer codecs can beat it on size at matched quality, though compatibility still favors JPEG.

The format also gives you no warning about cumulative damage. Files open and look fine until they do not, which is why professional workflows keep a lossless master and treat JPEG as the final export. Understanding the quantization step explains both the appeal and the cost: JPEG is popular because it discards what you will not miss, and file sizes shrink precisely because that discarded data never comes back.