Saturday 15 December 2018

Linux MInt 19 KDE - Batch Converting .webp images

Google's insistence on using .webp for web page images is a pain. I know we shouldn't be downloading images from web pages - but a lot of us do. And if we use right click in Chrome/Chromium we end up with a heap of .webp images that need specific viewers, and often don;t show as thumbnails in file managers.

I was converting one file at a time using the dweb command from webp tools, but I wanted to do a batch convert. I found that Flemming Mahler had shared a simple command to batch convert, so I'll share it here for anyone else who finds .webp to be annoying.

Flemming Mahler posted this little solution to converting .webp files (google's current image format - not liked by many image viewers) to png (easily read by common image viewers) on the Netfactory website

https://netfactory.dk/2015/07/16/bulk-c ... ng-format/

(1) Install webp tools:
sudo apt install webp

(2) Run the following command in the terminal:
find . -name "*.webp" | xargs -I {} dwebp {} -o {}.png

Wait a few moments...

No comments:

Post a Comment