Skip to content

This is a shell script that converts all JPEG and PNG images within a specified directory (and its subdirectories) into the WebP format. WebP is a modern image format that provides superior compression compared to JPEG and PNG formats, resulting in smaller file sizes and faster loading times for web pages.

Notifications You must be signed in to change notification settings

ajtazer/WebpUtil

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

WebpUtil

logo

This repository contains a script run.sh to convert JPEG and PNG images to WebP format using the cwebp command.

Usage

To use the script, follow these steps:

  1. Clone the repository to your local machine.

  2. Open a terminal window and navigate to the directory containing the run.sh script.

  3. 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.

  4. The script will search for all .jpg, .jpeg, and .png files in the specified directory and convert them to WebP format.

  5. The converted files will be saved in the same directory as the original files, with the extension .webp.

  6. The original files will not be deleted unless you uncomment the appropriate line in the script.

Creator

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!

image

About

This is a shell script that converts all JPEG and PNG images within a specified directory (and its subdirectories) into the WebP format. WebP is a modern image format that provides superior compression compared to JPEG and PNG formats, resulting in smaller file sizes and faster loading times for web pages.

Topics

Resources

Stars

Watchers

Forks

Languages