Batch Convert Images With SIPS
Overview
sips is a very useful built-in utility on macOS for scriptable image processing. It can do a lot of stuff, but let’s see a few handy use cases:
- Convert multiple images from one format to another (e.g. jpg to png):
$ mkdir PNGs
$ sips -s format png *.jpg --out PNGs
- Find and convert only selected images:
$ find . -iname "*.jpg" -type f -exec sh -c 'sips -s format png "$0" --out "${0%}.png"' {} \;
- Convert and change image quality (e.g. 60%):
$ sips -s format png -s formatOptions 60 *.jpg -o *.png