Use cwebp from Google.
NOTE: Support Linux, Mac, Windows.
Usage.
cwebp -q 80 image.png -o image.webp
Batch Process in Windows
cwebp
doesn't support batch processing, so we need to depend on OS utils.
Run PowerShell
.
Paste the following command
$inputDir= "C:\Users\Admin\Dropbox\jpg"$outputDir = "D:\webp"$cwebp = "D:\libwebp-0.4.1-rc1-windows-x64\bin\cwebp.exe"$files = Get-ChildItem $inputDirforeach ($file in $files) { $outputName = $outputDir + "\" + $file.BaseName + ".webp" & $cwebp $file.FullName -o $outputName}