This repository contains a script run.sh
to convert JPEG and PNG images to WebP format using the cwebp
command.
To use the script, follow these steps:
-
Clone the repository to your local machine.
-
Open a terminal window and navigate to the directory containing the
run.sh
script. -
Run the script by entering the following command:
./run.sh <path>
where
<path>
is the path to the folder containing the images to be converted.Note: If
<path>
contains spaces, enclose the path in quotes. -
The script will search for all
.jpg
,.jpeg
, and.png
files in the specified directory and convert them to WebP format. -
The converted files will be saved in the same directory as the original files, with the extension
.webp
. -
The original files will not be deleted unless you uncomment the appropriate line in the script.
This script was created by TAZER, a self-proclaimed coding genius who definitely didn't spend hours on Stack Overflow figuring out how to do this. It was made at the ungodly hour of 5:25AM, a day before his ASM Endsem, which he totally aced.
But in all seriousness, this script is a simple tool to convert your images to the efficient WebP format. Just run the run.sh script with the path to your image folder as an argument, sit back, and watch as the magic happens. Don't worry, TAZER made sure to write comprehensive instructions in the README so you don't have to rely on his coding skills alone. Happy converting!