Sustainability of Digital Formats: Planning for Library of Congress Collections

Introduction | Sustainability Factors | Content Categories | Format Descriptions | Contact
Format Description Categories >> Browse Alphabetical List

WebP

>> Back
Table of Contents
Format Description Properties Explanation of format description terms

Identification and description Explanation of format description terms

Full name WebP
Description

WebP, pronounced "weppy," is a raster image file format for providing lossless and lossy compression for images on the web. Matt Ellis in What is WebP? Pros and Cons of this Next-gen Image Format, 2021, defines lossless compression as when the image quality stays the same as the data size goes down and lossy compression as when the image quality goes down slightly as the data size goes down significantly. To quote Ellis, “WebP images are usually smaller than their counterparts, but with the same quality, thanks to their superior compression.” WebP is developed by Google, first released in 2018, and is defined through the WebP Open-Source Project Page (referenced throughout this document), where users can find WebP support, guides, reference, and samples.

Advantages of WebP:

  • Google reports that WebP lossless images are 26% smaller in size compared to PNGs and lossy images are 25-34% smaller in size compared to JPEGs.
  • Compatible with various browsers including native support for WebP lossy in Google Chrome (desktop) 17+, Google Chrome for Android version 25+, Microsoft Edge 18+, Firefox 65+, Opera 11.10+, Native web browser, Android 4.0+ (ICS), and Safari 14+ (iOS 14+, macOS Big Sur+). See Which web browsers natively support WebP? for full list
  • According to What is WebP? Pros and cons of this next-gen image format, websites load faster and use less bandwidth thanks to the smaller file size.
  • Higher levels of annimation support with the transparent backgrounds of PNG and the animation capabilities of GIF

Disadvantages of WebP:

  • What is WebP? Pros and cons of this next-gen image format details some drawbacks of WebP including that since it is designed mainly for the web, images may not suitable for printing
  • Older browsers may not support WebP.
  • Loss of some details, compressing files reduces quality.
  • In addition, Google notes that WebP is more CPU-intensive than animated GIF.

Reference implementation library [libwebp] is available from Google Git Repository or as a tarball (set of packaged files in a single file that is compressed using gzip).

WebP Container Specification:

Per the WebP Project Page, WebP files include VP8 lossy encoding or VP8L lossless encoding image data in a container package based on Resource Interchange File Format (RIFF). The WebP container supports:

  • Lossless compression.
  • Animation, multiple frames.
  • Metadata, stored in Exif or XMP formats (optional).
  • Transparency, i.e., alpha channel (optional).
  • Color Profile, may have embedded ICC profile (optional).

WebP files contain either a still image or animation, and the file format is based on RIFF, which has the basic file element chunk, containing a RIFF header with the FourCC ‘WEBP,’ followed by the VP8 or VP8L chunk, containing a header followed by the VP8 or VP8L data.

See WebP Project Page for more detailed information on WebP file format.

Uses of WebP:

WebP was developed to reduce the size of images to make the web faster with smaller and richer photos, “The WebP format essentially aims at creating smaller, better looking images that can help make the web faster.” WebP images are intended to replace JPEG, PNG, and GIF on the internet. According to Adobe.com’sWebP Files page, “Google created the WebP file format to make online image less bulky. With significantly reduced photo and graphic sizes, website load faster and give users a better experience.”

Relationship to other formats
    Defined via RIFF, Resource Interchange File Format (RIFF). Per WebP Project Page, “WebP file consists of VP8 or VP8L image data, and a container based on RIFF.”
    Contains VP8, VP8. Per WebP Project Page, “WebP file consists of VP8 or VP8L image data, and a container based on RIFF.”
    Contains VP8L, VP8L.
Per WebP Project Page, “WebP file consists of VP8 or VP8L image data, and a container based on RIFF.” Not described separately at this time. See Specification for WebP Lossless Bitstream for more information.
    Has later version WebP 2, WebP 2. Not described separately at this time. See Notes for more information.

Local use Explanation of format description terms

LC experience or existing holdings The Library of Congress has a small amount of WebP files in its collections.
LC preference See the Library of Congress Recommended Formats Statement for format preferences for still images works.

Sustainability factors Explanation of format description terms

Disclosure Open source, anyone can work with the WebP format and suggest improvements.
    Documentation

Google Developers - WebP Open-Source Project Page provides useful information, guides, references, and support.

Source Code:

WebP Container Specification, see (https://developers.google.com/speed/webp/docs/riff_container).

WebP Utilities and Library, see(https://developers.google.com/speed/webp/download).

VP8 Specification, lightweight decoder code. See (https://www.webmproject.org/docs/).

RIFF Container Page for WebP Container Specification. See RIFF. See Microsoft Build Resource Interchange File Format (RIFF).

Adoption

According to the WebP Project Page, “WebP is natively supported by Google Chrome, Safari, Firefox, Edge, the Opera browser, and many other tools and software libraries. Developers have also added support to a variety of image editing tools.”

WebP Project Page WebP Converter Download - encoding tool for PNG, JPEG, or TIFF to WebP and decoding tool for WebP to PNG for Linus, Windows or macOS.

According to CanIUse.com, the WebP format has over a 97% adoption rate. Up-to-date browser support for WebP on CanIUse.com.

Comments welcome.

    Licensing and patents

Per WebP Project Page, “Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.”

Comments welcome.

Transparency

WebP is a compressed raster image format. Depends upon algorithms and tools to read; will require sophistication to build tools.

Per WebP Project Page, “WebP’s lossy compression uses the same methodology as VP8 for predicting (video) frames...The WebP-lossless encoding is based on transforming the image using several different techniques.”

Comments welcome.

Self-documentation

Per WebP Project Page, WebP images can have metadata that is stored in Exif and XMP formats.

  • Exif: photo metadata, standard for recorded image and sound files specifying formatting tags.
  • XMP: digital document metadata, ISO standard for creation, processing, and interchange of metadata for digital documents.

Additional metadata guidance: Metadata Working Group’sGuidelines for Handling Metadata.

According to WebFlow.com’s blog, WebP Images: What They Are and How They Are Helpful in Building for the Web, August 2022, “Metadata is useful for giving digital context to images — for example, time and location data attached to an image from a digital camera. Users can add tags and short descriptions to images with metadata that help search engines identify images, boosting SEO.”

Comments welcome.

External dependencies

None beyond availability of supporting software/hardware.

Comments welcome.

Technical protection considerations

None.

Comments welcome.


Quality and functionality factors Explanation of format description terms

Still Image
Normal rendering

Good support. Per WebP Project Page, “WebP typically achieves an average of 30% more compression than JPEG and JPEG 2000, without loss of image quality.”

WebP Project Comparative Study of WebP, JPEG and JPEG 2000.

According to Emil Nova in Most Popular Web Image Formats: Full Overview & Comparison, February 2022, “WebP was conceived as a replacement for some of the best image formats on the web...It uses lossy compression and can produce images that are smaller that JPEGs with sacrificing any quality.”

Comments welcome.

Clarity (high image resolution)

Some support. Per WebP Project Page, “WebP is bitstream-compatible with VP8 (fdd000578) and uses 14 bits for width and height. The maximum pixel dimensions of a WebP image s 16383 x 16383.”

Lossy compression is adjustable, users can choose higher image quality/file size or lower image quality/file size.

Comments welcome.

Color maintenance

WebP supports 24-bit RBG Color. Per WebP Project Page, “Consistent with the VP8 bitstream, lossy WebP works exclusively with an 8-bit Y’CbCR4:2:0 (YUV420) image format...Lossless WebP works exclusively with RGB format.”

See RFC 6386 VP8 Data Format and Decoding Guide, Section 2, Format Overview for more detailed information.

Comments welcome.

Support for vector graphics, including graphic effects and typography

Some support. WebP files are raster images, built from pixels.

According to FileFormat.com, What is a WebP File?, WebP images provide support for transparency with a “8-bit alpha channel useful for graphical images.”

Chromium Blog, Lossless and Transparency Encoding in WebP, 2011, states “Photographic images typically encoded as JPEG can be encoded in WebP lossy mode to achieve smaller file size. Icons and graphics can be encoded better in WebP lossless mode than in PNG. WebP lossy with alpha can be used to create transparent images that have minimal visual degradation yet are much smaller in file size.”

WebP images do support transparency. Per WebP Project Page, “Lossless WebP supports transparency (also known as alpha channel) at a cost of just 22% additional bytes...Lossy WebP also supports transparency, typically providing 3x smaller file sizes compared to PNG.”

Comments welcome.

Support for multispectral bands

No support. Little to no information found on support for multispectral bands.

Comments welcome.

Functionality beyond normal rendering

Some support. WebP images have animation support on the following browsers, Google Chrome 32+, Microsoft Edge 18+, Firefox 65+, Opera 19+, and Safari 14+

Per WebP Project Page, WebP supports Animation, image data consists of multiple frames, controlled by ANIM and ANMF chunks.

  • ANIM: contains global parameters of animation, ie., background color, loop count.
  • ANMF: contains information about a single frame, ie., frame x, frame y, width, height, duration, reserved, blending method, disposal method, frame data.

Comments welcome.


File type signifiers and format identifiers Explanation of format description terms

Tag Value Note
Filename extension webp
See https://developers.google.com/speed/webp/docs/riff_container#naming.
Internet Media Type image/webp
See https://developers.google.com/speed/webp/docs/riff_container#naming.
Magic numbers Hex: 52 49 46 46 xx xx xx xx 57 45 42 50 56 50 38
ASCII: RIFF xx xx xx xx WEBPVP8
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'). See https://www.iana.org/assignments/media-types/image/webp
FOURCC WEBP
See https://developers.google.com/speed/webp/docs/riff_container#webp_file_header
Pronom PUID fmt/566
WebP Lossy. See http://www.nationalarchives.gov.uk/PRONOM/fmt/566
Pronom PUID fmt/567
WebP Lossless. See http://www.nationalarchives.gov.uk/PRONOM/fmt/567
Pronom PUID fmt/568
WebP Extended. See http://www.nationalarchives.gov.uk/PRONOM/fmt/568
Wikidata Title ID Q62617958
WebP, type of image file format. See https://www.wikidata.org/wiki/Q62617958
Wikidata Title ID Q683370
WebP Lossless, version of the WebP image file format. See https://www.wikidata.org/wiki/Q683370
Wikidata Title ID Q4598100
WebP Lossy, version of the WebP image file format. See https://www.wikidata.org/wiki/Q4598100
Wikidata Title ID Q62617999
WebP Container Specification, technical specification. See https://www.wikidata.org/wiki/Q62617999
Wikidata Title ID Q62618616
WebP Extended Lossless, version of the WebP image file format. See https://www.wikidata.org/wiki/Q62618616
Wikidata Title ID Q62618601
WebP Extended Lossy. See https://www.wikidata.org/wiki/Q62618601
Wikidata Title ID Q45989477
WebP Extended, version of the WebP image file format. See https://www.wikidata.org/wiki/Q45989477
Wikidata Title ID Q103815271
WebP 2, successor of the WebP image format. See https://www.wikidata.org/wiki/Q103815271

Notes Explanation of format description terms

General Per WebP Wikipedia page, Google started developing a second version of WebP, reference implementation is libwebp2, with a goal of reaching similar compression ratios as AVIF, but October 2022 WebP 2’s development repository stated “WebP 2 will not be released as an image format.”
History

WebP was originally created by On2 Technologies as a proprietary format, but shortly after acquiring On2 Technologies in 2010, Google announced the open format for lossy compressing graphics for the web, WebP.


Format specifications Explanation of format description terms


Useful references

URLs


Last Updated: 05/18/2023