Modern Image MIME Types: AVIF, WebP, and Fallbacks

Choosing the right image MIME type affects page weight and browser compatibility. AVIF vs WebP compression, browser support, picture element patterns, and CDN negotiation.

ZERO UPLOAD · ALL LOCAL
  1. Type a MIME string (e.g. application/json), file extension (e.g. .wasm), or keyword (e.g. "protobuf") to search the database.
  2. Use the category pills (Application, Audio, Font, Image, Model, Text, Video, Multipart) to browse all types in a category.
  3. Click Details on any card to expand the description, spec link, and server configuration snippets in a full-width panel.
  4. Click Copy next to any snippet block to copy the Nginx, Apache, .htaccess, or Caddy directive to your clipboard.

Image formats compared

  • maximum compression, newer browser support, native HDR
  • good compression, broad/near-universal support
  • universal fallbacks

The picture element selects the first source whose type attribute the browser supports — list AVIF first, WebP second, JPEG/PNG last.

APPLICATION (100 types)

application/json
.json
application/xml
.xml .xsl .xslt
application/pdf
.pdf
application/wasm
.wasm
application/javascript
.js .mjs .cjs
application/zip
.zip
application/gzip
.gz .tgz
application/x-tar
.tar
application/x-7z-compressed
.7z
application/vnd.rar
.rar
application/x-bzip2
.bz2
application/vnd.openxmlformats-officedocument.wordprocessingml.document
.docx
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
.xlsx
application/vnd.openxmlformats-officedocument.presentationml.presentation
.pptx
application/msword
.doc
application/vnd.ms-excel
.xls
application/vnd.ms-powerpoint
.ppt
application/octet-stream
.bin .exe .dll
application/x-www-form-urlencoded
application/cbor
.cbor
application/x-protobuf
.proto .pb
application/grpc
application/graphql-response+json
application/vnd.api+json
application/ld+json
.jsonld
application/hal+json
application/jwt
application/manifest+json
.webmanifest
application/rtf
.rtf
application/problem+json
application/json-patch+json
application/merge-patch+json
application/vnd.geo+json
.geojson
application/yaml
.yaml .yml
application/sql
.sql
application/epub+zip
.epub
application/java-archive
.jar
application/vnd.oasis.opendocument.text
.odt
application/vnd.oasis.opendocument.spreadsheet
.ods
application/vnd.oasis.opendocument.presentation
.odp
application/x-ndjson
.ndjson .jsonl
application/vnd.apple.mpegurl
.m3u8
application/dash+xml
.mpd
application/rss+xml
.rss
application/atom+xml
.atom
application/x-apple-diskimage
.dmg
application/x-debian-package
.deb
application/x-rpm
.rpm
application/x-sh
.sh
application/ecmascript
application/toml
.toml
application/zstd
.zst
application/x-xz
.xz
application/x-bzip
.bz
application/x-lzma
.lzma
application/x-iso9660-image
.iso
application/vnd.ms-cab-compressed
.cab
application/vnd.android.package-archive
.apk
application/x-msdownload
.msi
application/vnd.apple.installer+xml
.mpkg
application/x-httpd-cgi
.cgi
application/vnd.google-earth.kml+xml
.kml
application/vnd.google-earth.kmz
.kmz
application/vnd.sqlite3
.sqlite .sqlite3 .db
application/msgpack
.msgpack
application/schema+json
application/wsdl+xml
.wsdl
application/jose+json
application/x-pkcs12
.p12 .pfx
application/pkix-cert
.cer .der
application/x-pem-file
.pem .crt .key
application/pkcs8
.p8
application/pkcs10
.p10 .csr
application/postscript
.ps .eps .ai
application/x-latex
.latex .ltx
application/x-tex
.tex
application/x-dvi
.dvi
application/fits
.fits .fit .fts
application/vnd.oasis.opendocument.graphics
.odg
application/vnd.oasis.opendocument.chart
.odc
application/vnd.oasis.opendocument.formula
.odf
application/vnd.ms-project
.mpp .mpt
application/vnd.visio
.vsd .vst .vss .vsw
application/vnd.ms-access
.mdb
application/vnd.openxmlformats-officedocument.wordprocessingml.template
.dotx
application/vnd.ms-word.document.macroenabled.12
.docm
application/vnd.ms-excel.sheet.macroenabled.12
.xlsm
application/vnd.apple.pages
.pages
application/vnd.apple.numbers
.numbers
application/vnd.apple.keynote
.key
application/typescript
.ts
application/x-perl
.pl .pm
application/x-python-code
.pyc .pyo
application/x-csh
.csh
application/x-troff
.tr .roff .man
application/trig
.trig
application/n-triples
.nt
application/smil+xml
.smil .smi
application/vnd.mozilla.xul+xml
.xul
application/vnd.lotus-1-2-3
.123 .wks

AUDIO (23 types)

audio/mpeg
.mp3 .mpga
audio/ogg
.ogg .oga
audio/wav
.wav
audio/flac
.flac
audio/aac
.aac
audio/opus
.opus
audio/webm
.weba
audio/midi
.mid .midi
audio/mp4
.m4a .m4b .mp4a
audio/3gpp
.3gp .3gpp
audio/aiff
.aif .aiff
audio/x-ms-wma
.wma
audio/amr
.amr
audio/speex
.spx
audio/ac3
.ac3
audio/vorbis
audio/basic
.au .snd
audio/x-caf
.caf
audio/mpegurl
.m3u
audio/vnd.dts
.dts
audio/mp2
.mp2
audio/3gpp2
.3g2
audio/x-realaudio
.ra .ram

FONT (10 types)

font/woff
.woff
font/woff2
.woff2
font/ttf
.ttf
font/otf
.otf
application/vnd.ms-fontobject
.eot
font/collection
.ttc
font/sfnt
.sfnt
application/x-font-truetype
.ttf
application/x-font-opentype
.otf
application/x-font-woff
.woff

IMAGE (35 types)

image/jpeg
.jpg .jpeg .jfif
image/png
.png
image/gif
.gif
image/webp
.webp
image/avif
.avif
image/svg+xml
.svg .svgz
image/vnd.microsoft.icon
.ico
image/x-icon
.ico
image/bmp
.bmp
image/tiff
.tiff .tif
image/heic
.heic
image/heif
.heif
image/apng
.apng
image/jxl
.jxl
image/jp2
.jp2 .j2k .jpf
image/jpx
.jpx
image/vnd.djvu
.djvu .djv
image/vnd.adobe.photoshop
.psd
image/x-portable-bitmap
.pbm
image/x-portable-graymap
.pgm
image/x-portable-pixmap
.ppm
image/x-xcf
.xcf
image/ktx
.ktx
image/ktx2
.ktx2
image/x-exr
.exr
image/x-rgb
.rgb .rgba .sgi
image/x-xbitmap
.xbm
image/x-pcx
.pcx
image/vnd.wap.wbmp
.wbmp
image/x-tga
.tga .tpic
image/vnd.ms-photo
.jxr .hdp .wdp
image/x-win-bitmap
.cur
image/x-emf
.emf
image/wmf
.wmf
image/vnd.radiance
.hdr .rgbe

MODEL (19 types)

model/gltf+json
.gltf
model/gltf-binary
.glb
model/obj
.obj
model/stl
.stl
model/usd
.usd .usda .usdc
model/vnd.collada+xml
.dae
model/vnd.usdz+zip
.usdz
model/mtl
.mtl
model/vnd.dwf
.dwf
model/iges
.igs .iges
model/step
.stp .step .p21
model/step+xml
.stpx .stpxz
model/x3d+xml
.x3d
model/x3d+binary
.x3db .x3dbz
model/x3d-vrml
.x3dv .x3dvz
model/vnd.3mf
.3mf
model/vnd.fbx
.fbx
model/vnd.opengex
.ogex
model/JT
.jt

TEXT (33 types)

text/html
.html .htm
text/css
.css
text/csv
.csv
text/plain
.txt .text .conf .log
text/markdown
.md .markdown
text/calendar
.ics .ical .ifb
text/vcard
.vcf .vcard
text/javascript
.js
text/event-stream
text/tab-separated-values
.tsv
text/xml
.xml
text/x-python
.py .pyw
text/x-java-source
.java
text/x-c
.c .h
text/x-ruby
.rb
text/x-go
.go
text/x-rust
.rs
text/x-kotlin
.kt .kts
text/x-swift
.swift
text/x-scala
.scala .sc
text/x-php
.php .php3 .php4 .php5 .phtml
text/x-diff
.diff .patch
text/uri-list
.uri .urls .uris
text/x-rst
.rst
text/x-asciidoc
.adoc .asciidoc
text/x-nfo
.nfo
text/x-asm
.asm .s
text/troff
.roff .me .ms .mm
text/x-ini
.ini .cfg .inf
text/x-tcl
.tcl .tk
text/x-fortran
.f .f90 .for .f95
text/x-yaml
.yaml .yml
text/cache-manifest
.appcache .manifest

VIDEO (21 types)

video/mp4
.mp4 .m4v
video/webm
.webm
video/ogg
.ogv
video/x-msvideo
.avi
video/quicktime
.mov .qt
video/x-matroska
.mkv .mk3d
video/mp2t
.ts .mts .m2ts
video/mpeg
.mpeg .mpg
video/3gpp
.3gp .3gpp
video/3gpp2
.3g2 .3gp2
video/x-ms-wmv
.wmv
video/x-ms-asf
.asf .asx
video/vnd.avi
.avi
video/iso.segment
.m4s
video/x-dv
.dv .dif
video/x-ms-vob
.vob
video/H264
video/H265
video/AV1
video/x-flv
.flv
video/x-f4v
.f4v

MULTIPART (9 types)

multipart/form-data
multipart/byteranges
multipart/mixed
multipart/alternative
multipart/digest
multipart/related
multipart/signed
multipart/encrypted
multipart/report
No MIME types match your search.

Modern Image MIME Types: AVIF, WebP, JPEG, and picture Element Fallbacks

Choosing the right image MIME type affects page weight and browser compatibility. The web image landscape now includes four practical formats, each represented by a distinct MIME type: image/avif for maximum compression with newer browser support, image/webp for good compression with broad support, image/jpeg and image/png as universal fallbacks. Serving the optimal format to each browser requires either the picture element for client-side format selection or CDN-level content negotiation using the Accept header.1 AVIF achieves smaller files than WebP at equivalent perceived quality, especially at low bitrates where JPEG and WebP produce visible artefacts. WebP reached near-universal browser support ahead of AVIF and remains the safe second choice. Consequently, a progressive delivery strategy serves AVIF to supporting browsers, WebP to those that lack AVIF support, and JPEG or PNG to the remainder. CDN tools like Cloudflare Polish and Imgix handle this format selection automatically.2

AVIF versus WebP compression trade-offs

AVIF uses AV1 intra-frame coding to compress images, the same underlying technology as AV1 video. At low and medium quality levels, AVIF preserves perceptual sharpness better than WebP, which in turn outperforms JPEG at equivalent file sizes. HDR content and wide colour gamut images benefit specifically from AVIF, as it is the only widely-supported web image format with native HDR support.3

Encoding speed versus compression benefit

The practical trade-off is encoding speed: AV1 encoding is computationally intensive. Converting a large image library to AVIF during a build step adds significant processing time compared to WebP conversion. Consequently, many production pipelines delegate AVIF conversion to CDN-level tooling rather than maintaining pre-generated AVIF files in the repository. Building on this, projects using Cloudflare Polish, Imgix, or similar CDN image processors can serve AVIF to supporting browsers without any change to the source image assets or build pipeline.

Browser support and fallback using the picture element

Place source elements inside a picture element in order from most to least compressed. The browser selects the first source element with a type attribute it supports.4 Using type="image/avif" on the first source and type="image/webp" on the second, with a JPEG img element as the final fallback, ensures that each browser receives the best format it can handle. The img element's alt attribute and src attribute are required; the picture element itself does not display anything without the img.

srcset for responsive images

The srcset attribute on source elements adds responsive image support on top of format selection, letting you serve different image dimensions to different screen sizes within each format. Combining type and srcset allows serving AVIF at multiple resolutions, falling back to WebP at those same resolutions, with JPEG as the final fallback for browsers that support neither modern format. Browsers evaluate type support first and resolution fit second, always picking the most compressed available format at the appropriate size, which means a 4K display on Chrome receives a large AVIF while the same page on an older Safari gets a smaller JPEG.

CDN-level format negotiation

CDNs that support image format negotiation inspect the Accept request header and serve the best format the requesting browser supports, without any changes to the HTML markup or source image files. Cloudflare Polish, on Pro and Business plans, converts JPEG and PNG images to WebP or AVIF based on the Accept header value and caches the converted versions separately.5 Imgix adds f=auto to image URLs to enable automatic format selection including AVIF for supporting browsers. The Next.js Image component uses the Accept header to select between AVIF and WebP automatically when the image optimisation API is enabled. Building on this, CDN-level negotiation is the most operationally simple path to modern image delivery for projects that already use a CDN, since it requires no build tooling changes and handles the MIME type assignment on converted responses automatically.

CSS image-set() for AVIF and WebP in background-image declarations

The picture element only applies to img elements. CSS background images require image-set() to provide format alternatives in background-image declarations. The syntax lists format alternatives with type() hints: background-image: image-set(url("bg.avif") type("image/avif"), url("bg.webp") type("image/webp"), url("bg.jpg") type("image/jpeg")). Browsers evaluate the type() hints against their supported format list and request the winning format.6 Chrome, Firefox, and Safari 17.2 support image-set() with type() hints; older Safari requires the -webkit- prefixed form.

The MIME type in each type() hint controls which browsers select which format, mirroring the type attribute behaviour on picture source elements. The server must return the correct Content-Type header for the selected format: image/avif for .avif files and image/webp for .webp files. A mismatch between the type() hint and the actual Content-Type does not prevent display but causes format negotiation to behave inconsistently across browser versions.

Fallback ordering for browsers without image-set() support

Browsers that do not parse image-set() at all skip the property entirely. Placing a plain url() JPEG declaration before the image-set() declaration in the CSS handles this case through the cascade: browsers without image-set() support apply the earlier plain declaration, while browsers that do support it override it with the format-negotiated version. This stacking approach requires no JavaScript or server-side detection.

The same cascade principle applies to the picture element, where ordering the source elements from most to least compressed lets older browsers fall through naturally without any JavaScript. Keeping the plain declaration as the lowest-priority entry guarantees that every browser receives something renderable even when format negotiation fails entirely. map AVIF and WebP Content-Types your server must send for each layer.

When to use this

Use this guide when selecting a modern image delivery strategy for a web project, evaluating the trade-offs between AVIF and WebP, or configuring a CDN to serve format-negotiated images.

Examples

picture element: AVIF with WebP and JPEG fallbacks

Place source elements in order from best to most compatible. The browser picks the first type it supports.

picture element with responsive srcset and format fallbacks

Combine type and srcset to serve the best format at the right resolution for each browser.

Nginx: add AVIF and WebP MIME types

Required for static AVIF and WebP serving on Nginx installs that predate these format registrations.

Sources
  1. 1.

    Mozilla Developer Network, "source," developer.mozilla.org, accessed June 2026. https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/source

  2. 2.

    "AVIF," Wikipedia, wikipedia.org, accessed June 2026. https://en.wikipedia.org/wiki/AVIF

  3. 3.

    Netflix, "AVIF for Next-Generation Image Coding," netflixtechblog.com, 2020. https://netflixtechblog.com/avif-for-next-generation-image-coding-b1d75675fe4

  4. 4.

    Mozilla Developer Network, "image-set()," developer.mozilla.org, accessed June 2026. https://developer.mozilla.org/en-US/docs/Web/CSS/image-set

  5. 5.

    Cloudflare, "Vary for Images: Serve the Correct Images to the Correct Browsers," blog.cloudflare.com, 2021. https://blog.cloudflare.com/vary-for-images-serve-the-correct-images-to-the-correct-browsers/

  6. 6.

    Imgix, "f=auto format selection," imgix.com, accessed June 2026. https://docs.imgix.com/apis/rendering/format/auto

FAQ