How To Convert JPEG / JPG / PNG to WebP in Terminal on MacOS
Open Terminal, set the directory of your image folder and run a line listed below.
Step One: Open Terminal
Press command + space and search for Terminal. Press Enter.
Step Two: Set your image directory
This can be achieved by dragging a folder into a terminal. Press Enter when ready.
Step Three: Update this line of Code
Paste your image directory address in place of YOUR_DIRECTORY the line below. Copy when done.
for file in YOUR_DIRECTORY*; do cwebp -q 100 "$file" -o "${file%.*}.webp"; done
Step Four: Run the line in Terminal
Terminal should look similar to the image above when complete.
Any Questions ?
We are actively looking for feedback on how to improve this resource. Please send us a note to inquiries@delasign.com with any thoughts or feedback you may have.