WebP images often have a 25–35% reduction in filesize compared to their JPEG and PNG counterparts. This reduces page sizes and enhances functionality.
- According to YouTube, moving to WebP thumbnails sped up page loading by 10%.
- When Facebook moved to using WebP, they saw savings of 25–35% in file size for JPEGs and 80% in file size for PNGs.
JPEG, PNG, and GIF pictures can all be replaced with WebP. WebP also provides lossless and lossy compression. No data is lost during lossless compression. Lossy compression shrinks files but may sacrifice image quality in the process.
What is WebP format?
Google created the WebP image file format to take the role of the JPEG, PNG, and GIF file formats. It enables animation, alpha transparency, and both lossy and lossless compression.
In September 2010, Google announced the WebP format, and in April 2018, it unveiled the first iteration of its accompanying library.
Google set out to develop a free, open-source file format that holds both lossy and lossless compression formats in high-quality, with graphics accounting for 60%–65% of bytes on most web pages. When pages employ WebP images, especially on mobile, they load more quickly, consume less bandwidth, and conserve battery life while preserving image quality and size reduction.
Convert images to WebP
The cwebp command-line utility, online image convertor and the Imagemin WebP plugin are typically used by people to convert their photos to WebP. (npm package). The CLI is a fantastic option for small projects or if you’ll only need to convert photos once. The Imagemin WebP plugin is typically the best option if your project requires build scripts or build tools (e.g. Webpack or Gulp).
You can choose from a wide range of compression settings when converting photographs to WebP, but for the majority of users, the quality setting is all that matters. A quality level of 0 (lowest) to 100 can be specified (best).