MIME Types

image/jpeg

The MIME type for JPEG image files using lossy compression for photographs.

What Is This?

The image/jpeg MIME type indicates that the content is a JPEG image using lossy compression. JPEG is the most common image format on the web for photographs and complex images because it achieves excellent compression ratios with minimal visible quality loss. It does not support transparency.

Common Uses

1

Common Use

Photographs and photo galleries

2

Common Use

Social media images

3

Common Use

Product images on e-commerce sites

4

Common Use

Banner ads and hero images

Examples

Server Configuration

Serve files with the image/jpeg MIME type:

# Nginx
location ~ \.jpg$ {
  add_header Content-Type "image/jpeg";
}

# Apache
AddType image/jpeg .jpg
HTML Usage

Use this MIME type in HTML or HTTP:

Content-Type: image/jpeg

<!-- HTML reference -->
<link rel="preload" href="file.jpg" as="fetch" crossorigin>

Related Entries

More from this reference:

Frequently Asked Questions

Can I use both .jpg and .jpeg extensions?

Yes. Both .jpg and .jpeg extensions map to image/jpeg and are treated identically by browsers and servers. .jpg is more common due to the 8.3 filename convention legacy.

What JPEG quality should I use for the web?

Quality 70-85% (out of 100) is the sweet spot for web use. Below 70%, visible artifacts appear. Above 85%, file size increases significantly with minimal quality improvement.