Updated On: Tutorial updated and rechecked on 1st of April 2024
Views: 2,594
The webp image format has been around for quite a few years, but I only recently found out about it. The Webp image format greatly reduces the file size without losing any quality over formats such as .gif, .png and jpeg.
Gimp on Linux already has this function to export as webp, but you can also install the webp package in Ubuntu or Ubuntu based distributions to convert images to the webp format using the terminal.
With the basic command for converting one image below, you could create a bash script to take a folder of .png images or mixed images and convert these .webp format.
You can also convert images in .gif and .jpeg format to .webp
Below is the original Tux.png image, and below that is the Tux.webp image.
Quality wise they both images look identical, but more interestingly is the overall file size.
Tux.png image 11.9kb
Tux.webp image 4.6kb
If your displaying a lot of images across your website in .webp format, you will make a considerable saving on the file sizes compared to .gif, .png, and .jpeg formats, which also means a faster download of all images for visitors to your website.