A simple bash script to convert all images files with one command in a directory into webp file.
(Work on linux)
- Webp converter already installed.
Past the script in the target directory and in a terminal launch:
$ ./webpC
Paste the script in the root directory, add alias to bashrc.
Open bashrc file in a terminal, or with a file editor:
$ sudoedit ~/.bashrc
At the end of the file add the alias:
$ alias webpC=~/webpC
Save and refresh bashrc file:
$ source ~/.bashrc
echo "alias webpC=~/webpC" >> ~/.bashrc && source ~/.bashrc
Now you can launch webpC
command from every directory you want to convert images.