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

sudo apt install webp

To convert an image to webp format, run

Advertisement

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

-q  ............. quality factor (0:small..100:big), default=75

To view a webp image, run

vwebp image.webp
Add a comment

Leave a Reply

Your email address will not be published. Required fields are marked *

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Advertisement