Batch Resize and Convert Images With sips on Mac
Resizing eighty photos for a website shouldn't involve opening eighty files. Your Mac ships sips — the "scriptable image processing system" — which resizes, rotates, and converts images from the Terminal, one file or a folder at a time. One warning before anything else: sips edits files in place by default. Learn the --out flag first and originals stay safe.
Resize, safely
# fit within 1200px (longest side), writing a NEW file
sips -Z 1200 photo.jpg --out photo-1200.jpg
# batch: resize every JPEG into a separate folder
mkdir resized
sips -Z 1200 *.jpg --out resized
-Z scales the image so its longest side is at most the given pixel count, preserving aspect ratio — the flag you want for "make these web-sized." When --out names a directory, each processed file lands there under its own name, which is the pattern for batches. Without --out, sips overwrites the original — there is no undo for that beyond a backup, so the honest advice is: always type --out, or work on copies. (Exact dimensions exist too: -z height width — lowercase, and it will distort to fit.)
Convert formats — the HEIC workhorse
The single most useful sips job on a modern Mac: turning iPhone HEIC photos into JPEGs everything can open.
# one file
sips -s format jpeg photo.heic --out photo.jpg
# a whole folder of iPhone photos, at 85% quality
mkdir jpegs
sips -s format jpeg -s formatOptions 85 *.heic --out jpegs
-s format accepts jpeg, png, tiff, heic, gif, bmp, and more; -s formatOptions sets JPEG quality from low to best or a percentage. Note the extension on single-file output is yours to set correctly — sips converts the data, but it writes to whatever filename you give it.
Rotate, flip, and inspect
# rotate 90° clockwise (undo: sips -r 270 …)
sips -r 90 photo.jpg --out photo-rotated.jpg
# mirror horizontally (undo: run the same flip again)
sips -f horizontal photo.jpg --out photo-flipped.jpg
# read dimensions without changing anything
sips -g pixelWidth -g pixelHeight photo.jpg
-g (get) is entirely read-only — sips -g all photo.jpg dumps every property sips knows, from DPI to color profile, and is worth running once just to see what's addressable.
A real-world recipe
Combining the pieces — "web-ready copies of everything in this folder":
mkdir web
sips -Z 1600 -s format jpeg -s formatOptions 80 *.heic *.png --out web
One line: every HEIC and PNG becomes a quality-80 JPEG no larger than 1600px, in a fresh folder, originals untouched. For the last step — filenames — note that files written into web keep their original names and extensions, so a quick cd web && for f in *.heic; do mv "$f" "${f%.heic}.jpg"; done tidies the extensions after a format change. That's the whole workflow a paid batch-resize app sells.
Crop and print-prep
# crop to 1080×1080 around the center
sips -c 1080 1080 photo.jpg --out photo-square.jpg
# set print resolution metadata to 300 DPI
sips -s dpiHeight 300 -s dpiWidth 300 scan.jpg --out scan-print.jpg
-c takes height then width and crops around the image center — the quick square-crop for profile pictures and thumbnails. The DPI settings change only metadata, not pixels: they tell printing software how large the image should come out, which fixes the "why is my scan printing poster-sized" problem. As everywhere with sips, --out keeps the original as your undo.
sips batches images; Mainspring batches Mac-tuning. 90+ hidden macOS settings as labelled toggles — including screenshot format and location — all reversible.
Try Mainspring free →Signed & notarized by Apple · 1-day free trial · $29 once
Prefer clicks for one-offs?
For a single image, Preview does the same resize and convert with menus — see our guide to resizing images on Mac. sips earns its keep when the file count hits double digits.