JPEG

JPEG is the most widely accepted photo format in existence. It stores one still image, uses lossy DCT compression, and trades detail for size at a ratio you choose when saving.

At a glance

MIME type
image/jpeg
Extensions
.jpg, .jpeg, .jpe
Kind
Image
Compression
Lossy
Type
Encoded bitstream
Transparency
Not supported
Bit depth
8-bit per channel

File structure

A JPEG file is a sequence of marker segments (SOI, APPn, DQT, SOF, SOS, EOI). Metadata such as EXIF, ICC profiles and thumbnails ride along in APP segments, which is why a JPEG can carry GPS coordinates without changing how it looks.

How the data is compressed

The image is converted to YCbCr, split into 8×8 blocks, transformed with a discrete cosine transform and quantised. Quantisation is where quality is lost: higher quality settings keep more coefficients, lower settings discard more of them. Chroma channels are usually subsampled, since human vision is less sensitive to colour detail than to brightness.

Where it is accepted

Universally supported by browsers, phones, cameras, printers, office suites and basically every image pipeline written since 1992. It is the safest default when you do not know what will open the file.

Strengths

  • Accepted by virtually every device and application.
  • Small files for photographic content at moderate quality settings.
  • Mature metadata support for camera, copyright and colour information.

Weaknesses

  • Lossy: every save discards more detail, so repeated editing degrades the image.
  • No transparency channel, so logos and cut-outs need a white or coloured background.
  • Visible block artefacts and ringing around sharp text at low quality.

Typical uses

  • Photos for websites, email and print previews.
  • Uploads to portals that only whitelist .jpg.
  • Camera output that will be shared rather than archived.

Common problems

  • Repeated re-saving compounds artefacts; keep one master and export copies.
  • A .jpg renamed from a PNG still has no alpha channel — the extension does not add capability.
  • Colour shifts when the embedded ICC profile is stripped by an upload form.

Convert or compress it

Related formats