.avif MIME Type: image/avif

Files ending in .avif (AVIF image) use the MIME type image/avif.

Updated

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

What is the MIME type of .avif files?

The MIME type (media type) for AVIF image files with the .avif extension is image/avif. AV1-based image format, typically smaller than WebP. Some older servers do not know the extension and send application/octet-stream — add the type explicitly.

Content-Type header

Content-Type: image/avif

Server configuration

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

Should .avif files be compressed?

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