What is JPEG?

JPEG is a lossy raster image format designed for photographs that uses a discrete cosine transform to make small files, and it does not support transparency.

By · Updated

Want the full walkthrough? Read: WebP vs PNG for logos and graphics →

Explained in more detail

JPEG is named after the Joint Photographic Experts Group, which defined it. It is one of the most widely supported image formats, supported by every major browser. The file extensions .jpg and .jpeg mean the same thing.

In its common lossy form it compresses by splitting each image component into 8 by 8 sample blocks, applying a discrete cosine transform to each block, and quantizing the coefficients, discarding fine detail. Encoders often store color at a lower resolution than brightness (chroma subsampling), because the eye is less sensitive to color detail. A quality setting controls how aggressive the quantization is.

JPEG excels at continuous-tone photographs, where it can be much smaller than a lossless file with little visible loss. It is weak at sharp edges and flat color. Text, line art and logos show blocky artifacts and ringing around edges, and the effect gets worse every time the file is re-saved.

JPEG has no alpha channel. Converting a transparent PNG to JPEG forces transparent pixels onto a solid color, so you have to choose that color up front. This is the main reason logos and cut-outs are poor candidates for JPEG.

Many marketplaces and print services require JPEG, so it remains the practical choice when compatibility matters more than efficiency.

Triim can convert PNG or WebP to JPEG and back, with an adjustable quality setting.

Related terms

Try it in Triim

Further reading

Sources

Part of the Triim image terms glossary, by Rocco Bombardieri.