Convert all PNGs in a folder to WEBP with FFmpeg

FFmpeg is an awesome tool that can convert not only videos but also audio and images.

On Linux and Mac, run it like this in the folder where you want the conversion to run:

for i in *.png; do ffmpeg -y -i "$i" -c:v libwebp "${i%.*}.webp"; done

On Windows:

FOR /F "tokens=*" %G IN ('dir /b *.png') DO ffmpeg -y -i "%G" -c:v libwebp "%~nG.webp"


Did you know that I made an in-browser image converter, where you can convert your images without uploading them anywhere? Try it out and let me know what you think. It's free.

Leave a Comment

Your email address will not be published. Required fields are marked *