WebP is an image format developed by Google in 2010. The format allows users to save an image in either lossy or lossless format. Google has made bold claims about the compression efficiency of the format stating that it can be up to 34% smaller than the equivalent JPEG or PNG file. Google believes that through the adoption of a more efficient image format, the speed of the web as a whole can be increased due to the volume of images being viewed at any one time across the world.
WebP lossy compression works by a technique of prediction. Each block of pixels are predicted based on other blocks of pixels surrounding it. The difference between the prediction and reality is then encoded. Due to the efficiency of the prediction technique many of the blocks contain a zero difference which results in greater compression and thus a smaller file size. WebP lossless compression works by using parts of the image that have already been analysed to construct other parts of the image.