Image glossary

JPEG

Also known as JPG, .jpg, .jpeg

JPEG is a lossy raster image format from 1992 that remains the most universally readable image format in existence, with no support for transparency.

What it is

JPEG divides an image into blocks, converts each block from pixels into frequency components using a discrete cosine transform, and then rounds those components more coarsely the higher their frequency. Fine detail is discarded first because human vision is least sensitive to it. The quality setting scales how coarse that rounding is.

Everything JPEG does well and everything it does badly follows from that design.

Why it is still the default outside the browser

It opens everywhere, without exception: print shops, government upload forms, older phones and cameras, scanner software, embroidery machines, systems nobody has updated in fifteen years. When an image has to leave the web and enter a workflow you do not control, JPEG is the format that will not generate an email.

It also encodes extremely fast. At around 40 milliseconds per image, an encoder finishes a hundred photographs while a slower format is still on the first dozen.

The three things it is bad at

No transparency. There is no alpha channel in JPEG, so a cut-out saved as JPEG is silently flattened onto white. This is the most common way people lose transparency they have just spent time creating.

Gradients band. Skies, studio backdrops and soft shadows develop visible steps at moderate quality, because the block transform has nothing left to spend on smooth transitions.

Text and hard edges smear. Screenshots, charts and diagrams pick up mosquito noise — a halo of artefacts around every high-contrast edge. A screenshot saved as JPEG is both larger and uglier than the same screenshot as PNG.

Quality settings and generation loss

Quality 100 is not lossless. It is the most expensive lossy setting available, storing sensor noise and prior artefacts with great precision at two to three times the file size of quality 90. The useful range for photographs is 75-85, where files are dramatically smaller and the difference is invisible at normal viewing size.

Because JPEG is lossy, every re-save degrades the image further. Editing an exported JPEG and saving again is a second generation; a messaging app that re-encodes it is a third. Keep a lossless master, do all edits on it, and export JPEG once.

Tools that work with this

Back to the full glossary.