MIME Types

image/webp

The modern MIME type for WebP images offering superior compression for both lossy and lossless encoding.

What Is This?

The image/webp MIME type indicates that the content is a WebP image developed by Google. WebP provides superior compression compared to JPEG and PNG — lossy WebP images are 25-35% smaller than equivalent quality JPEGs, and lossless WebP images are 26% smaller than PNGs. WebP also supports transparency (alpha channel) and animation.

Common Uses

1

Common Use

Modern web pages optimizing for performance

2

Common Use

E-commerce product images with fast loading requirements

3

Common Use

Blog and news article images

4

Common Use

Replacing both JPEG and PNG with a single format

Examples

Server Configuration

Serve files with the image/webp MIME type:

# Nginx
location ~ \.webp$ {
  add_header Content-Type "image/webp";
}

# Apache
AddType image/webp .webp
HTML Usage

Use this MIME type in HTML or HTTP:

Content-Type: image/webp

<!-- HTML reference -->
<link rel="preload" href="file.webp" as="fetch" crossorigin>

Related Entries

More from this reference:

Frequently Asked Questions

Should I use WebP for all images?

Yes, with fallbacks. Use WebP as the primary format with JPEG/PNG fallbacks via the <picture> element. This gives modern browsers better compression while maintaining compatibility.

Does WebP support animation like GIF?

Yes. WebP supports animated images with much better compression than GIF. Animated WebP files are typically 90% smaller than equivalent GIFs.