Skip to content

Instantly share code, notes, and snippets.

@frozenex
Created September 14, 2020 12:17
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save frozenex/6d5343138737091d0563675c1a08b1c2 to your computer and use it in GitHub Desktop.
Save frozenex/6d5343138737091d0563675c1a08b1c2 to your computer and use it in GitHub Desktop.
Bulk convert images to webp format using cwebp library in linux
#!/bin/bash
# Copy this file to any directory containing images & then run this script in bash shell
# Get all png images in the current directory & convert it to webp format
for file in *.png ;
do
cwebp -q 80 "$file" -o "${file%.png}.webp";
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment