coderef

WebPBaseline · Widely available

The WebP image format is a raster graphics file format that supports animation, alpha transparency, and lossy as well as lossless compression.

Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since Sep 16, 2020. Widely available since Mar 16, 2023.

Browser support

DesktopChrome
1–31Not supported
32+Supportedsince Jan 14, 2014
Current: 155
Edge
12–17Not supported
18+Supportedsince Oct 2, 2018
Current: 154
Firefox
1–64Not supported
65+Supportedsince Jan 29, 2019
Current: 157
Safari
1–13.1Not supported
14+Supportedsince Sep 16, 2020
Current: 27
MobileChrome Android
18–31Not supported
32+Supportedsince Jan 15, 2014
Current: 155
Firefox Android
4–64Not supported
65+Supportedsince Jan 29, 2019
Current: 157
Safari iOS
1–13.4Not supported
14+Supportedsince Sep 16, 2020
Current: 27

How to use

This feature is Baseline widely available — use it freely, no fallback needed.

Example

HTML
<picture>
  <source type="image/webp" srcset="photo.webp">
  <img src="photo.jpg" alt="…">
</picture>

Feature detection

There’s no simple runtime check for this feature; rely on the support table and test in your target browsers.

Sub-features

Support for each part of the feature (5). The overall table above shows when the whole feature works.

Sub-featureChromeEdgeFirefoxSafariChrome AndroidFirefox AndroidSafari iOS
mediatypes.image.webp17186514186514
mediatypes.image.webp.alpha23186514256514
mediatypes.image.webp.animation32186514326514
mediatypes.image.webp.lossless23186514256514
mediatypes.image.webp.lossy17186514186514