Batch-Convert images to WEBP format

Recently, I needed to convert plenty of images from jpeg to webp. For tasks like this, I like to use the shell. In my case, bash.

The one-liner I've used to batch covert the images is the following: fd -e jpg --exec cwebp {} -o webp/{.}.webp

To get all my images, I've used fd, an alternative to the default find command. Both can do the job, but I prefer fd because of the simpler syntax.

And to convert the images, there is cwebp. I don't know if there are alternatives, this is the first I've found in my search, and it did the job well. 😊

In the end, I've saved ~90% of the file size, which is quite impressive. 🚀

22/100 of #100DaysToOffload

#log #bash #webp