How to Shorten the cwebp Command in Linux Mint with a Bash Function – MCQ Academy – English
- Published
- Genre
- Linux Apps
External source
mcqacademy.com External website
You are viewing the Vahuk Story page. The link above opens the shared source website.
Learn how to create a simple Bash function in Linux Mint that shortens the cwebp command and converts PNG or JPG images to WebP with less typing.
I usually optimize images locally before uploading them to the live servers for my websites. Since I use Linux Mint, one of my regular tools for this job is cwebp, which I run directly from the command line to convert PNG and JPG images to WebP.
My most-used command is simple:
cwebp image-name.png -o image-name.webp
It works well, but after using it again and again, I started looking for a way to avoid typing the same filename twice every time I convert an image. When filenames are long, that small repetition becomes even more annoying. …
Community reactions
Karma 10.2
Discussion
0 comments
No comments yet. Be the first to join the discussion.