Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # get's all the .jpg files in the directory and converts them to webp
- # must have downloaded google's webp lib from: https://developers.google.com/speed/webp/docs/precompiled
- # then just have this script and your jpgs in the same folder as the cwebp.exe file and run it.
- $files = Get-ChildItem "C:\tools\convert to webp" -Filter *.jpg
- foreach ($f in $files){
- echo $f.BaseName
- $jpg = $f.BaseName + '.jpg'
- $webp = $f.BaseName + '.webp'
- echo $jpg
- .\cwebp.exe -q 80 $jpg -o $webp
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement