I recently had to process a large number of images in a couple of ways so I thought I’d log them down here.
Convert a folder’s worth of PNG files into WebP…
The command above will find all PNG images in a folder, convert them into WebP at a quality level of 95 and output them with the same name that they originally had but with the webp extension instead. This is handy so that you can see the PNG version and WebP version side by side.
Note that you will need ‘imagemagick’, ‘webp’ and the ‘rename’ packages installed for this. I installed them using