Internet-Draft | WebP Image Format Media Type Registratio | October 2021 |
Zern | Expires 25 April 2022 | [Page] |
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.¶
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.¶
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.¶
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."¶
This Internet-Draft will expire on 25 April 2022.¶
Copyright (c) 2021 IETF Trust and the persons identified as the document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.¶
This document provides references for the WebP image format and considerations for its use across platforms.¶
WebP is a Resource Interchange File Format (RIFF) [riff-spec] based image file format [webp-riff] which supports lossless and lossy compression as well as alpha (transparency) and animation. It covers use cases similar to JPEG [jpeg-spec], PNG [RFC2083] and the Graphics Interchange Format (GIF) [gif-spec].¶
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 [RFC6386]. The lossless algorithm [webp-lossless] 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 [lz77], Huffman coding [huffman], and a color cache are used for compression of the bulk data.¶
This section contains the media type registration details as per [RFC6838].¶
Type name: image¶
Subtype name: webp¶
Required parameters: N/A¶
Optional parameters: N/A¶
Encoding considerations: Binary. The Base64 encoding [RFC4648] should be used on transports that cannot accommodate binary data directly.¶
Security considerations: See Section 3 below.¶
Interoperability considerations: See Section 4 below.¶
Published specification: [webp-riff]¶
Applications that use this media type: Applications that are used to display and process images, especially when smaller image file sizes are important.¶
Fragment identifier considerations: N/A¶
Additional information:¶
Person & email address to contact for further information:¶
Intended usage: COMMON¶
Restrictions on usage: N/A¶
Author:¶
Change controller:¶
Provisional registration? (standards tree only): N/A¶
Security risks are similar to other media content and may include integer overflows, out-of-bounds reads and writes to both heap and stack, uninitialized data usage, null pointer references, resource (disk, memory) exhaustion and extended resource usage (long running time) as part of the demuxing and decoding process. These may cause information leakage (memory layout and contents) or crashes and thereby denial of service to an application using the format. [cve.mitre.org-libwebp] [crbug-security].¶
The format is defined using little-endian byte ordering (see Section 3.1 of [RFC2781]), 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 [webp-riff] are required for decoding of the image. These have been finalized, but were extended in the format's early stages so some older readers may not support lossless or animated image decoding.¶
IANA has updated the "Image Media Types" registry to include 'image/webp' as described in Section 2.¶