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.jpg

sips -g pixelWidth -g pixelHeight <image> — Show the dimensions of an image.

sips -g pixelWidth -g pixelHeight photo.png

sips -g format <image> — Show the image format.

sips -g format photo.heic

sips -g dpiWidth -g dpiHeight <image> — Show the DPI (resolution) of an image.

sips -g dpiWidth -g dpiHeight print.tiff

Resize

sips -Z <maxpx> <image> — Resize image to fit within a maximum dimension (preserves aspect ratio).

sips -Z 1024 photo.jpg

sips -z <height> <width> <image> — Resize to exact dimensions (may distort).

sips -z 600 800 photo.jpg

sips --resampleWidth <width> <image> — Resize by width only (preserves aspect ratio).

sips --resampleWidth 1920 photo.jpg

sips --resampleHeight <height> <image> — Resize by height only (preserves aspect ratio).

sips --resampleHeight 1080 photo.jpg

Convert Format

sips -s format <format> <image> --out <output> — Convert image to a different format.

sips -s format png photo.jpg --out photo.png

sips -s format jpeg <image> --out <output> — Convert to JPEG.

sips -s format jpeg screenshot.png --out screenshot.jpg

sips -s format heic <image> --out <output> — Convert to HEIC (smaller file size).

sips -s format heic photo.jpg --out photo.heic

sips -s format pdf <image> --out <output> — Convert an image to PDF.

sips -s format pdf scan.png --out scan.pdf

sips -s formatOptions <quality> <image> — Set JPEG quality (0-100, low=small file).

sips -s format jpeg -s formatOptions 80 photo.png --out photo.jpg

Transform

sips -r <degrees> <image> — Rotate an image clockwise by degrees.

sips -r 90 photo.jpg

sips -f horizontal <image> — Flip an image horizontally.

sips -f horizontal photo.jpg

sips -f vertical <image> — Flip an image vertically.

sips -f vertical photo.jpg

sips -c <height> <width> <image> — Crop image to specified dimensions (from center).

sips -c 1080 1080 photo.jpg

sips -p <height> <width> <image> — Pad image to specified dimensions (adds whitespace).

sips -p 2000 2000 photo.jpg

Batch Processing

sips -Z <maxpx> *.jpg — Resize all JPEG images in the current directory.

sips -Z 1024 *.jpg

for 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"; done

sips -Z 800 --out <dir> *.png — Resize all PNGs and save to a different directory.

sips -Z 800 --out thumbnails/ *.png

sips -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

  • caffeinate – keep the Mac from going to sleep
  • defaults – read and write macOS settings from the terminal
  • diskutil – manage disks, partitions and volumes