JPEG and PNG two image formats as we all know, JPEG is a lossy compression algorithm, the compression ratio is relatively high, and PNG is often used for image formats that require transparency, they are applied to different occasions, in contrast, the same image is stored in JPEG and PNG two format, PNG volume is large , because PNG has a more transparent channel. WEBP is a new compression format, its compression rate is very high, than the JPEG picture size of about 40%, WEBP Works is, webp picture is placed in a lightweight riff container, although each picture just added a few bytes (less than 20 bytes), But it has the ability to accommodate more bytes, so that the image can add more metadata. Although the WEBP compression ratio is very high, but the drawback is that its compression time is relatively long, almost 8 times times the JPEG compression algorithm.
Comparison of three compression algorithms for WEBP, JPEG, and PNG