Convert image to WebP format in Ubuntu
WebP is an image format for web by Google. The size of webp images are much smaller compared with other image formats, so better to use webp images on websites for faster site load speed.
To install webp on Ubuntu/Debian, run
1 |
sudo apt install webp |
To convert an image to webp format, run
1 |
cwebp image.png -o image.webp |
With the above command, image.png file gets converted to image.webp
You can specify quality with -q option
1 |
-q <float> ............. quality factor (0:small..100:big), default=75 |
To view a webp image, run
1 |
vwebp image.webp |