WebP Image Format Media Type Registration
Google LLC
1600 Amphitheatre Parkway
Mountain View
CA
94043
United States of America
+1 650 253-0000
jzern@google.com
General
Internet Engineering Task Force
VP8
WebP
WebP is a RIFF-based image file format which supports lossless and lossy
compression as well as alpha (transparency) and animation. It covers use
cases similar to JPEG, PNG and GIF.
Introduction
This document provides references for the WebP image format and
considerations for its use across platforms.
WebP is a Resource Interchange File Format
(RIFF) based image file format
which supports lossless and lossy compression
as well as alpha (transparency) and animation. It covers use cases
similar to JPEG,
PNG and the
Graphics Interchange Format (GIF).
WebP consists of two compression algorithms used to reduce the size of
image pixel data, including alpha (transparency) information. Lossy
compression is achieved using VP8 intra-frame encoding
. The lossless algorithm
stores and restores the pixel values
exactly, including the color values for zero alpha pixels. The format
uses subresolution images, recursively embedded into the format
itself, for storing statistical data about the images, such as the
used entropy codes, spatial predictors, color space conversion, and
color table. LZ77,
Huffman coding, and a color cache are used
for compression of the bulk data.
The 'image/webp' Media Type
This section contains the media type registration details as per .
Registration Details
Media type name: image
Media subtype name: webp
Required parameters: N/A
Optional parameters: N/A
Encoding considerations: Binary. The Base64
encoding should be used on transports that cannot accommodate
binary data directly.
Security considerations: See below.
Interoperability considerations: See
below.
Applications which use this media type: Anywhere image size is an
issue.
Fragment identifier considerations: N/A
Restrictions on usage: N/A
Additional information:
- Deprecated alias names for this type: N/A
- Magic number(s): The first 4 bytes are 0x52, 0x49, 0x46, 0x46
('RIFF'), followed by 4 bytes for the RIFF chunk size. The next 7
bytes are 0x57, 0x45, 0x42, 0x50, 0x56, 0x50, 0x38 ('WEBPVP8').
- File extension(s): webp
- Apple Uniform Type Identifier: org.webmproject.webp conforms to
public.image
- Object Identifiers: N/A
Security Considerations
Security risks are similar to other media content and may include
buffer overruns and uninitialized data usage as part of the demuxing
and decoding process
.
Interoperability Considerations
The format is defined using little-endian byte ordering (see
), but demuxing and decoding are
possible on platforms using a different ordering with the appropriate
conversion.
The container is RIFF-based and allows extension via user defined
chunks, but nothing beyond the chunks defined by the container format
are required for decoding of the image.
IANA Considerations
IANA has updated the "Image Media Types" registry to include
'image/webp' as described in .
References
Normative References
WebP Lossless Bitstream Specification
Google LLC
WebP RIFF Container
Google LLC
Informative References
libwebp Security Issues
libwebp CVE List
GIF89a Specification
A Method for the Construction of Minimum Redundancy
Codes
JPEG Standard (JPEG ISO/IEC 10918-1 ITU-T Recommendation
T.81)
A Universal Algorithm for Sequential Data Compression
Multimedia Programming Interface and Data Specifications
1.0