Skip to main content

image/jpeg

image

The MIME type for JPEG images. JPEG uses lossy compression optimized for photographs. The .jpg and .jpeg extensions are interchangeable – both map to image/jpeg. Supported by all browsers and image processing libraries since the early web.

Details

image/jpeg is one of the oldest and most universal web image types. JPEG (ISO/IEC 10918) uses discrete cosine transform (DCT) lossy compression.

When to use JPEG: - Photographs and complex images with gradients - When file size matters more than perfect quality - When transparency is not needed (JPEG has no alpha channel)

When NOT to use JPEG: - Line art, logos, icons (use SVG or PNG – JPEG creates artifacts) - Images requiring transparency (use PNG or WebP) - Screenshots of text (JPEG blurs text edges)

Modern alternatives: WebP and AVIF produce smaller files at equivalent quality. Serve WebP with image/webp as the first Accept option, fall back to image/jpeg.

Common use

Photographs, product images, social media previews

See Also