Fork me on GitHub

Batch convert to WebP

The script on this website converts all images within a designated folder into the contemporary WebP format. No need to install software or upload your images to potentially dodgy conversion websites.

How to use

Windows

Windows does not natively support the execution of shell scripts. One way to run the script below is to install Git on your computer. Other options are highlighted in this StackOverflow thread.

  1. Download the convert.sh script and the cwebp executable file.
  2. Copy those 2 files to the folder with the images that you want to convert to .webp.
  3. Open Git Bash by pressing the Windows key and typing git bash
  4. Navigate to your image folder:

    cd link/to/your/image/folder

  5. Start the batch convert process by typing the following command in the terminal window:

    sh convert.sh

  6. All .webp files will be saved in a subfolder called webp.
macOS
  1. Download the convert.sh script and the cwebp executable file.
  2. Copy those 2 files to the folder with the images that you want to convert to .webp.
  3. Right-click on this image folder and select New Terminal at Folder
  4. select 'New Terminal at Folder'
  5. Start the batch convert process by typing the following command in the terminal window:

    sh convert.sh

  6. All .webp files will be saved in a subfolder called webp.

Notes