Mac (PNG & JPG)
- Save
img2webp.shand place it in the same folder as your images to convert - Make sure to install
brew install webp
Usage:
./img2webp.sh
Usage with optional quality parameter:
./img2webp.sh [QUALITY] - (quality 1-100, default: 100)
Example:
./img2webp.sh 80
If the script doesn’t run, update the permissions:
chmod +x img2webp.sh
Windows (PNG)
# Convert-PNG-to-WebP.ps1
-
Downloads cwebp (Google WebP tools)
-
Converts all PNGs to lossless WebP
-
Verifies every PNG has a matching WebP
Place in the same folder as the pngs, run with powershell.
Tip: If double‑clicking doesn’t run due to execution policy, open the folder in Terminal and run:
Unblock-File -Path ".\Convert-PNG-to-WebP.ps1"