What is WebP
webp is most suitable format for web pages ; these are small and render fast
How To convert
- Install webp package
sudo apt install webpsudo apt update
- Single file conversion
cwebp <input/file/path/name.png> -o <output_name>
Batch Job : convert all images from a folder
go to the folder where images are located and run below code in terminal
for f in *.png; do cwebp "$f" -o "converted/${f%.png}.webp"; done
Note: this for loop is good for running any operation as a batch job.