img-webp

A tool to convert regular(png/jpg) to the webp format

Usage no npm install needed!

<script type="module">
  import imgWebp from 'https://cdn.skypack.dev/img-webp';
</script>

README

img-webp CLI

npm npm GitHub last commit (branch)

The img-webp CLI converts all .png and .jpg's in the directory into the .webp format. At this time there can only be passed two options: --quality(0-100) and if you want to format with lossless compression (--lossless/-l), lossy compression is used by default if the lossless option is not passed.

Instalation

$ npm i -g img-webp

Usage example

Format all images to lossy compressed webp images with quality of 80.

$ img-webp -q 80

Format all images to lossless compressed webp images.

$ img-webp -l

Get all options

$ img-webp