.jpg MIME Type: image/jpeg

Files ending in .jpg (JPEG image) use the MIME type image/jpeg.

Updated

image/jpeg
MIME type for .jpg
Images
Category
No
Compress with gzip/Brotli

What is the MIME type of .jpg files?

The MIME type (media type) for JPEG image files with the .jpg extension is image/jpeg. The same type is used for .jpeg. Note the type is image/jpeg, never image/jpg. The same type covers .jpeg, .jpe and .jfif.

Content-Type header

Content-Type: image/jpeg

Server configuration

ServerConfiguration
Nginx (mime.types or types {})image/jpeg jpg;
Apache (.htaccess)AddType image/jpeg .jpg
IIS (web.config)<mimeMap fileExtension=".jpg" mimeType="image/jpeg" />
Node.js / Expressres.type('jpg') or res.setHeader('Content-Type', 'image/jpeg')
Amazon S3Set Content-Type: image/jpeg on the object (metadata), or pass --content-type image/jpeg to aws s3 cp

Should .jpg files be compressed?

No. JPEG image files are already compressed internally, so gzip or Brotli would waste CPU and barely reduce — sometimes even increase — the size. Leave image/jpeg out of your compression configuration.

Why the MIME type matters

Browsers decide what to do with a response — render, run, play or download — from the Content-Type header, not the file extension. With X-Content-Type-Options: nosniff, a wrong type causes stylesheets and scripts to be blocked outright. For uploads, never trust the type sent by the client; check the file’s content (its magic bytes) on the server.

MIME type lookupSearch every common file extension and MIME type, with copy-ready Content-Type headers.
Search all MIME types

Frequently asked questions

What is the MIME type for .jpg?
image/jpeg.
How do I set the Content-Type for .jpg in Nginx?
Make sure image/jpeg jpg; is listed in the types block (usually in /etc/nginx/mime.types) and reload Nginx.
Should I gzip .jpg files?
No — the format is already compressed, so HTTP compression gives no benefit.