cwebp

Compress an image file to a WebP file.

TLDR

Compress a WebP file with default settings (q = 75) to the [o]utput file

$ cwebp [path/to/image_file] -o [path/to/output.webp]
copy


Compress a WebP file with the best [q]uality and largest file size
$ cwebp [path/to/image_file] -o [path/to/output.webp] -q [100]
copy


Compress a WebP file with the worst [q]uality and smallest file size
$ cwebp [path/to/image_file] -o [path/to/output.webp] -q [0]
copy


Compress a WebP file and apply resize to image
$ cwebp [path/to/image_file] -o [path/to/output.webp] -resize [width] [height]
copy


Compress a WebP file and drop alpha channel information
$ cwebp [path/to/image_file] -o [path/to/output.webp] -noalpha
copy

Copied to clipboard