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
Common Use
Photographs and photo galleries
Common Use
Social media images
Common Use
Product images on e-commerce sites
Common Use
Banner ads and hero images
Examples
Serve files with the image/jpeg MIME type:
# Nginx
location ~ \.jpg$ {
add_header Content-Type "image/jpeg";
}
# Apache
AddType image/jpeg .jpgUse 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:
image/png
The MIME type for PNG (Portable Network Graphics) image files with lossless compression.
image/gif
The MIME type for GIF images supporting animation and transparency.
image/webp
The modern MIME type for WebP images offering superior compression for both lossy and lossless encoding.
image/svg+xml
The MIME type for SVG (Scalable Vector Graphics) vector images.
image/avif
The next-generation MIME type for AVIF images with advanced compression based on AV1 video codec.
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.