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
Related terms
- WebPWebP is an image format developed by Google that supports both lossy and lossless compression with transparency, and produces files roughly 25-35% smaller than JPEG at matched visual quality.
- AVIFAVIF is an image format derived from the AV1 video codec that compresses roughly 40-55% smaller than JPEG at matched visual quality, at the cost of much slower encoding.
- PNGPNG is a lossless raster image format with full alpha transparency, excellent on screenshots and line art and very inefficient on photographs.
- Lossy compressionLossy compression permanently discards image information judged imperceptible in order to make files dramatically smaller, and the discarded data cannot be recovered.
- QuantizationQuantization is the step in lossy image compression that rounds transformed image data to coarser values, and it is the point at which information is permanently lost.
- BandingBanding is the appearance of visible steps in what should be a smooth gradient, caused by too few distinct values being available to represent a gradual change.
Back to the full glossary.