.webp MIME Type: image/webp

Files ending in .webp (WebP image) use the MIME type image/webp.

Updated

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

What is the MIME type of .webp files?

The MIME type (media type) for WebP image files with the .webp extension is image/webp. Supported by all current browsers. Use <picture> with type="image/webp" if you still need a JPEG/PNG fallback.

Content-Type header

Content-Type: image/webp

Server configuration

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

Should .webp files be compressed?

No. WebP image files are already compressed internally, so gzip or Brotli would waste CPU and barely reduce — sometimes even increase — the size. Leave image/webp 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 .webp?
image/webp.
How do I set the Content-Type for .webp in Nginx?
Make sure image/webp webp; is listed in the types block (usually in /etc/nginx/mime.types) and reload Nginx.
Should I gzip .webp files?
No — the format is already compressed, so HTTP compression gives no benefit.