Filename extension | .webp [1] |
---|---|
Internet media type | image/webp [2] |
Uniform Type Identifier (UTI) | org.webmproject.webp [3] |
Magic number | 52 49 46 46 xx xx xx xx 57 45 42 50 56 50 38 [2] |
Developed by | |
Initial release | 30 September 2010 [4] |
Type of format | Image file format with lossless and lossy compression |
Contained by | Resource Interchange File Format (RIFF) [5] |
Open format? | Yes [6] |
Website | developers |
Developer(s) | |
---|---|
Stable release | |
Repository | chromium |
Written in | C |
Type | Digital imaging |
License | BSD license |
Website | developers |
WebP is a raster graphics file format developed by Google intended as a replacement for JPEG, PNG, and GIF file formats. It supports both lossy and lossless compression, [8] as well as animation and alpha transparency.
Google announced the WebP format in September 2010, and released the first stable version of its supporting library in April 2018.
WebP was first announced by Google on 30 September in 2010 as a new open format for lossy compressed true-color graphics on the web, producing files that were smaller than JPEG files for comparable image quality. [9] It was based on technology which Google had acquired with the purchase of On2 Technologies. [10] As a derivative of the VP8 video format, it is a sister project to the WebM multimedia container format. [11] WebP-related software is released under a BSD free software license. [12]
On 3 October 2011, [13] Google added an "Extended File Format" [14] allowing WebP support for animation, ICC profile, XMP and Exif metadata, and tiling (compositing very large images from maximum 16384 × 16384 tiles). Tiling support was never finalized and was removed from the spec again. [15] Older animated GIF files can be converted to animated WebP.[ citation needed ]
On 18 November 2011, Google announced a new lossless compression mode, and support for transparency (alpha channel) in both lossless and lossy modes; support was enabled by default in libwebp 0.2.0 (16 August 2012). [16] [17] According to Google's measurements in November 2011, a conversion from PNG to WebP resulted in a 45% reduction in file size when starting with PNGs found on the web, and a 28% reduction compared to PNGs that are recompressed with pngcrush and PNGOUT. [18]
In July 2016, Apple added WebP support to early beta versions of macOS Sierra and iOS 10, [19] but support was later removed in the GM seed versions of iOS 10 and macOS Sierra released in September 2016. In September 2020, WebP support was added in Safari version 14. [20]
The supporting libwebp library reached version 1.0 in April 2018. [21]
In 2019, the Alliance for Open Media published the AVIF standard, intending it to be a successor to WebP.[ citation needed ]
As of 2024, web browsers that support WebP had 97% market share. [22]
Bytes | Content | |||
---|---|---|---|---|
0–3 | R | I | F | F |
4–7 | length + 12 | |||
8–11 | W | E | B | P |
12–15 | V | P | 8 | (space) [23] |
16–19 | length(padded) | |||
20–… | VP8 key frame | |||
pad | ? (even length) |
WebP's lossy compression algorithm is based on the intra-frame coding of the VP8 video format [24] and the Resource Interchange File Format (RIFF) as a container format. [4] As such, it is a block-based transformation scheme with eight bits of color depth and a luminance–chrominance model with chroma subsampling by a ratio of 1:2 (YCbCr 4:2:0). [25] Without further content, the mandatory RIFF container has an overhead of only twenty bytes, though it can also hold additional metadata. [4] The side length of WebP images is limited to 16383 pixels. [6]
WebP is based on block prediction. Each block is predicted on the values from the three blocks above it and from one block to the left of it (block decoding is done in raster-scan order: left to right and top to bottom). There are four basic modes of block prediction: horizontal, vertical, DC (one color), and TrueMotion. Mispredicted data and non-predicted blocks are compressed in a 4×4 pixel sub-block with a discrete cosine transform or a Walsh–Hadamard transform. Both transforms are done with fixed-point arithmetic to avoid rounding errors. The output is compressed with entropy encoding. [25] WebP also has explicit support for parallel decoding. [25]
The reference implementation consists of converter software in the form of a command-line program for Linux (cwebp) and a programming library for the decoding, the same as for WebM. The open-source community ported the converter to other platforms, such as Windows. [26]
The WebP container (i.e., RIFF container for WebP) allows feature support over and above the basic use case of WebP (i.e., a file containing a single image encoded as a VP8 key frame). The WebP container provides additional support for:
WebP's lossless compression, a newer algorithm unrelated to VP8, was designed by Google software engineer Jyrki Alakuijala. It uses advanced techniques such as dedicated entropy codes for different color channels, exploiting 2D locality of backward reference distances and a color cache of recently used colors. This complements basic techniques such as dictionary coding, Huffman coding and color indexing transform. [16] This format uses a recursive definition: all of the control images, such as the local entropy code selection, are encoded the same way as the whole image itself. [27]
Google has proposed using WebP for animated images as an alternative to the popular GIF format, citing the advantages of 24-bit color with transparency, combining frames with lossy and lossless compression in the same animation, and support for seeking to specific frames. [28] Google reports a 64% reduction in file size for images converted from animated GIFs to lossy WebP, however, with a very noticeable visual impact, both at default settings, and optimised settings. When converting using lossless WebP, a 19% reduction is achieved as reported by Google, [28] although real world performance is nearer to 10%. [29]
Google actively promotes WebP, and Google Chrome and all Chromium-based browsers support the format. The proprietary PageSpeed Insights tool suggests that webmasters switch from JPEG and PNG to WebP in order to improve their website speed score. [30]
Microsoft Edge versions released after January 2020 are based on the Chromium browser, and have native WebP support. EdgeHTML-based versions of Microsoft Edge support WebP through a platform extension (installed by default) (unless running in the security-hardened "Application Guard" mode, which does not support platform extensions). [31]
Safari added support for WebP in 2020 with iOS 14 and macOS Big Sur. [20]
Mozilla Firefox [32] (and its fork Waterfox [33] ) officially supports WebP since January 2019. [34] It was initially considered for implementation in 2013. [35]
Pale Moon implemented initial support for WebP in 2016 with its version 26 milestone. [36]
SeaMonkey began supporting WebP with its version 2.53.5 released in November 2020. [37]
GNOME Web, Midori, and Falkon natively support WebP.
WebP can also be displayed in all major browsers using the WebPJS JavaScript library, although support in Internet Explorer 6 and above is achieved using Flash. [38]
At the announcement of WebP in September 2010, no graphics software supported WebP. By 2011, there were plugins for several popular graphics software programs to support WebP, and some programs such as Acorn and Pixelmator had added native support. [40] Over time, support for the WebP format has grown.
Software | First version with native support | Release date of native support | Notes | Reference |
---|---|---|---|---|
Pixelmator Classic | 1.6.2 | 6 October 2010 | [41] [42] | |
Acorn | 2.6 | 21 October 2010 | Export of lossless WebP added in 2022 [43] | [44] |
ImageMagick | 6.6.8-5 | 14 March 2011 | [45] [46] | |
GraphicConverter | 7.2 | 8 April 2011 | [47] | |
XnView | 1.98 | 9 May 2011 | [48] | |
PaintShop Pro | X4 (14.0) | 7 September 2011 | [49] [50] [51] | |
Picasa | 3.9 | 8 December 2011 | [52] | |
IrfanView | 4.32 | 15 December 2011 | [53] | |
GDAL | 1.9.0 | 9 January 2012 | [54] [55] | |
gThumb | 3.1.1 | 23 September 2012 | [56] | |
PhotoLine | 18 | 4 October 2013 | [57] [58] | |
Canvas X | 15 | 20 November 2013 | [59] [60] | |
Krita | 2.9.5 | 10 June 2015 | Basic support | [61] |
5.1.0 | 18 August 2022 | Full support | [62] [63] | |
Aseprite | 1.1.1 | 6 November 2015 | [64] | |
Sketch | 41 | 8 November 2016 | [65] | |
GIMP | 2.10 | 27 April 2018 | [66] [67] | |
Paint.NET | 4.2.5 | 1 October 2019 | [68] | |
Pixelmator Pro | 1.6.4 | 4 June 2020 | [69] | |
Inkscape | 1.1 | 24 May 2021 | Export only | [70] |
Xara Designer Pro+ | 18.5 | 24 August 2021 | [71] | |
Adobe Illustrator | 26.0 | 16 October 2021 | [72] [73] | |
Adobe Photoshop | 23.2 | 17 February 2022 | [74] [75] | |
Blender | 3.2 | 8 June 2022 | [76] [77] | |
LibreOffice Draw | 7.4 | 18 August 2022 | [78] | |
Affinity Designer | 2.0 | 9 November 2022 | [79] [80] | |
Shotwell | 0.32.0 | 23 April 2023 | [81] | |
Windows Photos | 2023.11050.2013.0 | 3 May 2023 | [82] [83] | |
CorelDRAW | 24.5 | 18 September 2023 | [84] | |
Clip Studio Paint | 3.0.0 | 14 March 2024 | [85] |
In 2019, Google released a free plug-in that enables WebP support in earlier versions of Adobe Photoshop. [86] Free Photoshop plug-ins had been released by Telegraphics and fnordware before that. [87] [88] GIMP up to version 2.8 also supported WebP via a plugin; [89] later, this plugin was shipped in GIMP 2.9 branch, and received multiple improvements. [90] Google has also released a plug-in for Microsoft Windows that enables WebP support in Windows Photo Viewer, Microsoft Office 2010, FastPictureViewer, [91] and any other application that uses Windows Imaging Component. [92]
FFmpeg linked with the VP8/VP9 reference codec library libvpx can extract VP8 key frames from WebM media and a script can then add the WebP RIFF header and the NUL pad byte for odd frame lengths. Meanwhile, FFmpeg supports libwebp directly.
Gmail and Google Photos both support WebP. Support for WebP is also planned for Google App Engine. The Instant Previews feature of Google Search uses WebP internally to reduce disk space used by previews. [93] Android 4.0 supports encoding and decoding WebP images (via bitmap and Skia). [94] SDL_image supports the format since 1.2.11.
Sumatra PDF supports WebP images for both standalone files and comic books since version 2.4. [95]
Telegram Messenger uses WebP for its Stickers, claiming they are displayed five times faster compared to the other formats usually used in messaging apps. [96]
Signal uses WebP for its non-animated stickers. [97]
LibreOffice supports the import of WebP images since version 7.4, [98] so does the LibreOffice technology based online office Collabora Online.
Godot Engine as of version 4.0 supports importing and exporting WebP images and uses WebP as its internal format for storing imported compressed textures. [99]
Content management systems (CMS) usually do not support WebP natively or by default. However, for most popular CMS, extensions are available for automated conversion from other image formats to WebP and delivering WebP images to compatible browsers. Since June 2021, WordPress supports WebP natively. [100]
Social media services known to natively support WebP in messages, include Facebook, [101] Slack, [102] Discord [103] and Element, but as of 2 October 2024 the latter only support static WebP, and not animated WebP.
Like VP8 on which it is based, former lossy WebP supports only 8-bit YUV 4:2:0 format, [104] which may cause color loss on images with thin contrast elements (such as in pixel art and computer graphics) and ghosting in anaglyph. To overcome this restriction, new lossless WebP supports VP8L encoding that works exclusively with 8-bit RGBA (red, green, blue, alpha) color space. [105] [106]
However, due to the complexity of the compression, it is also significantly slower than other web image formats. It is therefore usually not advisable to process the images directly, as is the case with Web Map Services. [107]
In September 2010, Fiona Glaser, a developer of the x264 encoder, wrote a very early critique of WebP. [24] Comparing different encodings (JPEG, x264, and WebP) of a reference image, she stated that the quality of the WebP-encoded result was the worst of the three, mostly because of blurriness on the image. Her main remark was that "libvpx, a much more powerful encoder than ffmpeg's jpeg encoder, loses because it tries too hard to optimize for PSNR" (peak signal-to-noise ratio), arguing instead that "good psycho-visual optimizations are more important than anything else for compression". [24]
In October 2013, Josh Aas from Mozilla Research published a comprehensive study of current lossy encoding techniques [108] and was not able to conclude that WebP outperformed mozjpeg by any significant margin. [109]
This section's factual accuracy may be compromised due to out-of-date information. The reason given is: CVE-2023-4863 has been patched tempestively in libwebp 1.3.2 and should no longer be exploitable.(December 2023) |
In September 2023, two critical vulnerabilities [110] relating to WebP images were discovered by Apple Security Engineering and Architecture (SEAR) and the Citizen Lab, potentially affecting Google Chrome, Chromium-based browsers and the libwebp project from Google, among any application implementing libwebp. Among these vulnerabilities, CVE-2023-4863 was an actively exploited vulnerability with a high risk rating of CVSS 8.8. This could lead to an out of bounds/overflow condition in applications using the affected libwebp library, upon exploitation of a maliciously crafted .webp lossless file. This could result in a denial of service (DoS), or worse, enabling malicious remote code execution (RCE). The extensive use of libwebp packages across hundreds of applications, including all categories from web browsers to mobile apps, posed a major patching challenge to mitigate the vulnerability due to the demanding testing requirements before release, highlighting the implications of this vulnerability on a wide scale.
Google has been developing the second version of WebP since June 2021. Its reference implementation is libwebp2
. The main goal of this new format is to reach similar compression ratios as AVIF while remaining faster to encode and decode. [111]
On 12 October 2022, Google changed WebP 2's development repository's README file to state that "WebP 2 will not be released as an image format" and began describing WebP 2 as a "playground for image compression experiments". [112]
JPEG is a commonly used method of lossy compression for digital images, particularly for those images produced by digital photography. The degree of compression can be adjusted, allowing a selectable tradeoff between storage size and image quality. JPEG typically achieves 10:1 compression with little perceptible loss in image quality. Since its introduction in 1992, JPEG has been the most widely used image compression standard in the world, and the most widely used digital image format, with several billion JPEG images produced every day as of 2015.
JPEG Network Graphics is a JPEG-based graphics file format which is closely related to PNG: it uses the PNG file structure as a container format to wrap JPEG-encoded image data.
In information technology, lossy compression or irreversible compression is the class of data compression methods that uses inexact approximations and partial data discarding to represent the content. These techniques are used to reduce data size for storing, handling, and transmitting content. Higher degrees of approximation create coarser images as more details are removed. This is opposed to lossless data compression which does not degrade the data. The amount of data reduction possible using lossy compression is much higher than using lossless techniques.
Multiple-image Network Graphics (MNG) is a graphics file format published in 2001 for animated images. Its specification is publicly documented and there are free software reference implementations available.
Portable Network Graphics is a raster-graphics file format that supports lossless data compression. PNG was developed as an improved, non-patented replacement for Graphics Interchange Format (GIF)—unofficially, the initials PNG stood for the recursive acronym "PNG's not GIF".
Image compression is a type of data compression applied to digital images, to reduce their cost for storage or transmission. Algorithms may take advantage of visual perception and the statistical properties of image data to provide superior results compared with generic data compression methods which are used for other digital data.
JPEG 2000 (JP2) is an image compression standard and coding system. It was developed from 1997 to 2000 by a Joint Photographic Experts Group committee chaired by Touradj Ebrahimi, with the intention of superseding their original JPEG standard, which is based on a discrete cosine transform (DCT), with a newly designed, wavelet-based method. The standardized filename extension is .jp2 for ISO/IEC 15444-1 conforming files and .jpx for the extended part-2 specifications, published as ISO/IEC 15444-2. The registered MIME types are defined in RFC 3745. For ISO/IEC 15444-1 it is image/jp2.
libjpeg is a free library with functions for handling the JPEG image data format. It implements a JPEG codec alongside various utilities for handling JPEG data. It is written in C and distributed as free software together with its source code under the terms of a custom permissive (BSD-like) free software license, which demands attribution. The original variant is maintained and published by the Independent JPEG Group (IJG). Meanwhile, there are several forks with additional features.
Raster graphics editors can be compared by many variables, including availability.
An image file format is a file format for a digital image. There are many formats that can be used, such as JPEG, PNG, and GIF. Most formats up until 2022 were for storing 2D images, not 3D ones. The data stored in an image file format may be compressed or uncompressed. If the data is compressed, it may be done so using lossy compression or lossless compression. For graphic design applications, vector formats are often used. Some image file formats support transparency.
A camera raw image file contains unprocessed or minimally processed data from the image sensor of either a digital camera, a motion picture film scanner, or other image scanner. Raw files are so named because they are not yet processed, and contain large amounts of potentially redundant data. Normally, the image is processed by a raw converter, in a wide-gamut internal color space where precise adjustments can be made before conversion to a viewable file format such as JPEG or PNG for storage, printing, or further manipulation. There are dozens of raw formats in use by different manufacturers of digital image capture equipment.
JPEG XR is an image compression standard for continuous tone photographic images, based on the HD Photo specifications that Microsoft originally developed and patented. It supports both lossy and lossless compression, and is the preferred image format for Ecma-388 Open XML Paper Specification documents.
PGF is a wavelet-based bitmapped image format that employs lossless and lossy data compression. PGF was created to improve upon and replace the JPEG format. It was developed at the same time as JPEG 2000 but with a focus on speed over compression ratio.
Better Portable Graphics (BPG) is a file format for coding digital images, which was created by programmer Fabrice Bellard in 2014. He has proposed it as a replacement for the JPEG image format as the more compression-efficient alternative in terms of image quality or file size. It is based on the intra-frame encoding of the High Efficiency Video Coding (HEVC) video compression standard. Tests on photographic images in July 2014 found that BPG produced smaller files for a given quality than JPEG, JPEG XR and WebP.
Free Lossless Image Format (FLIF) is a lossless image format claiming to outperform PNG, lossless WebP, lossless BPG and lossless JPEG 2000 in terms of compression ratio on a variety of inputs.
High Efficiency Image File Format (HEIF) is a digital container format for storing individual digital images and image sequences. The standard covers multimedia files that can also include other media streams, such as timed text, audio and video.
JPEG XT is an image compression standard which specifies backward-compatible extensions of the base JPEG standard.
JPEG XL is a royalty-free open standard for the compressed representation of raster graphics images. It defines a graphics file format and the abstract device for coding JPEG XL bitstreams. It is developed by the Joint Photographic Experts Group (JPEG) and standardized by the International Electrotechnical Commission (IEC) and the International Organization for Standardization (ISO) as the international standard ISO/IEC 18181. As a superset of JPEG/JFIF encoding, with a compression mode built on a traditional block-based transform coding core and a "modular mode" for synthetic image content and lossless compression. Optional lossy quantization enables both lossless and lossy compression.
AV1 Image File Format (AVIF) is an open, royalty-free image file format specification for storing images or image sequences compressed with AV1 in the HEIF container format. It competes with HEIC, which uses the same container format built upon ISOBMFF, but HEVC for compression. Version 1.0.0 of the AVIF specification was finalized in February 2019.
New "Lossless" option when exporting images as WebP.
New: Acorn can now open WebP images, as well as write them with Web Export.
Add support for the WebP image format.
webp import and export added (Intel only)
Support for WebP format (Weppy format, PlugIn, reading + saving)
Starting with GDAL 1.9.0, GDAL can read and write WebP images through the WebP library.
Added ability to load and save WebP images.
WebP is new file format, which is intended to replace JPEG. It allows to create very small image files. The Web Export function supports WebP, too.
Canvas 15 now supports the importing and exporting of WebP, a format designed to allow lossless and lossy compression for images being uploaded to the web.
Add support for WebP (on Linux)
WebP support (MR 891 MR 1268). We had basic WebP support already, but this adds full support using WebP Codec with every possible toggle imaginable.
Added support to load/save static .webp files
Sketch can now both import and export images in the WebP format.
GIMP now also ships with native WebP support, including features like animation, ICC profiles, and metadata.
Support for several new image formats added (OpenEXR, RGBE, WebP, HGT), as well as improved support for many existing formats (in particular more robust PSD importing).
New: WebP images are now supported due to bundling @null54's excellent WebPFileType plugin (v1.3.0.0)
Export as JPG, TIFF, optimized PNG and WebP directly from Inkscape
WebP has been added to the extensive list of file formats that Designer Pro can export.
You can now open or place High-efficiency Image Format (HEIF) or Web Picture (WebP) format files in Illustrator.
You can now open or place High-efficiency Image Format (HEIF) or Web Picture (WebP) format files in Illustrator.
With Photoshop 23.2, Photoshop provides full support to the WebP file format.
Blender now has support for the WebP image format which works similar to PNG but compresses faster and generates smaller file sizes.
WebP file import and export
A range of enhancements to the Export docker/inspector make it easier than ever to output objects and pages to even more file formats, now including CDR, WEBP, CGM, PSD, and BMP.
Import and export WebP files: You can now import and export this lightweight file format used for web pages