sips — Resize and Convert Images
Practical guide to sips — resize, convert, rotate and query images right in the macOS terminal, ideal for batch processing without extra software.
sips (Scriptable Image Processing System) is the image tool built right into macOS: you resize, convert and edit images directly from the terminal — with no extra software to install. It reads and writes JPEG, PNG, TIFF, GIF, BMP, HEIC and more, queries properties like dimensions and DPI, and — thanks to wildcards and shell loops — is ideal for batch-processing entire folders. This guide walks you through the commands you reach for daily, from pulling image info to mass-resizing.
Important: without --out, sips works in place and overwrites the original irreversibly. Work on copies, or always pass a separate target with --out.
Image Info
sips -g all <image> — Show all properties of an image.
sips -g all photo.jpgsips -g pixelWidth -g pixelHeight <image> — Show the dimensions of an image.
sips -g pixelWidth -g pixelHeight photo.pngsips -g format <image> — Show the image format.
sips -g format photo.heicsips -g dpiWidth -g dpiHeight <image> — Show the DPI (resolution) of an image.
sips -g dpiWidth -g dpiHeight print.tiffResize
sips -Z <maxpx> <image> — Resize image to fit within a maximum dimension (preserves aspect ratio).
sips -Z 1024 photo.jpgsips -z <height> <width> <image> — Resize to exact dimensions (may distort).
sips -z 600 800 photo.jpgsips --resampleWidth <width> <image> — Resize by width only (preserves aspect ratio).
sips --resampleWidth 1920 photo.jpgsips --resampleHeight <height> <image> — Resize by height only (preserves aspect ratio).
sips --resampleHeight 1080 photo.jpgConvert Format
sips -s format <format> <image> --out <output> — Convert image to a different format.
sips -s format png photo.jpg --out photo.pngsips -s format jpeg <image> --out <output> — Convert to JPEG.
sips -s format jpeg screenshot.png --out screenshot.jpgsips -s format heic <image> --out <output> — Convert to HEIC (smaller file size).
sips -s format heic photo.jpg --out photo.heicsips -s format pdf <image> --out <output> — Convert an image to PDF.
sips -s format pdf scan.png --out scan.pdfsips -s formatOptions <quality> <image> — Set JPEG quality (0-100, low=small file).
sips -s format jpeg -s formatOptions 80 photo.png --out photo.jpgTransform
sips -r <degrees> <image> — Rotate an image clockwise by degrees.
sips -r 90 photo.jpgsips -f horizontal <image> — Flip an image horizontally.
sips -f horizontal photo.jpgsips -f vertical <image> — Flip an image vertically.
sips -f vertical photo.jpgsips -c <height> <width> <image> — Crop image to specified dimensions (from center).
sips -c 1080 1080 photo.jpgsips -p <height> <width> <image> — Pad image to specified dimensions (adds whitespace).
sips -p 2000 2000 photo.jpgBatch Processing
sips -Z <maxpx> *.jpg — Resize all JPEG images in the current directory.
sips -Z 1024 *.jpgfor f in *.heic; do sips -s format jpeg "$f" --out "${f%.heic}.jpg"; done — Convert all HEIC files to JPEG.
for f in *.heic; do sips -s format jpeg "$f" --out "${f%.heic}.jpg"; donesips -Z 800 --out <dir> *.png — Resize all PNGs and save to a different directory.
sips -Z 800 --out thumbnails/ *.pngsips -g pixelWidth -g pixelHeight *.jpg — Show dimensions of all JPEG images.
sips -g pixelWidth -g pixelHeight *.jpg Conclusion
sips is a surprisingly capable tool that ships preinstalled on every Mac — perfect for quick conversions, thumbnails, or scripting the automated prep of entire image folders. Always remember that without --out, sips writes straight into the original file and overwrites it; for non-destructive workflows, work on copies or write deliberately into an output directory. For more complex image manipulation you'd reach for ImageMagick, but for a quick one-off job sips is hard to beat.
Further Reading
- sips(1) – macOS man page – full option reference at ss64.com
- Edit images from the command line – Apple Support – Terminal basics from Apple
Related Commands
- caffeinate – keep the Mac from going to sleep
- defaults – read and write macOS settings from the terminal
- diskutil – manage disks, partitions and volumes