Back to Blog
·5 min read·quickpix-image-compressor

macOS sips command — the complete guide (2026)

Every Mac ships with a fast, sandbox-safe image processor called sips. Resize, convert, compress, strip metadata, batch — without installing anything. Here's everything it can do.

There's an image processor on your Mac you've probably never touched. It's been there since OS X Panther in 2003, ships unmodified on every macOS install, and can resize, convert, compress, rotate, strip metadata, and batch-process images faster than most GUI apps. It's called sips (Scriptable Image Processing System) and it lives at /usr/bin/sips.

This guide covers everything sips does, with concrete examples for the workflows I actually use.

Why sips exists and why nobody uses it

sips was Apple's solution for system-level image handling — designed for shell scripts, Automator actions, and other macOS infrastructure that needed image manipulation without launching Preview or Photos. It uses the same Core Graphics / Core Image engines as the rest of macOS, so output quality matches what Preview's Export gives you.

It's largely forgotten because: 1. Documentation is sparse (Apple's man sips is correct but terse) 2. There's no GUI promoting it 3. Most blog posts about Mac image compression default to recommending ImageOptim or TinyPNG

But for batch operations, automation, and CI pipelines, sips is the most pragmatic tool on macOS.

The 9 commands you'll actually use

1. Resize to a max edge

# Resize so longest edge is 1200px, preserving aspect ratio
sips -Z 1200 photo.jpg --out photo-small.jpg

-Z (capital Z) keeps proportions. -z (lowercase) forces an exact size, distorting the image.

2. Convert format

# Convert HEIC to JPEG
sips -s format jpeg input.heic --out output.jpg

# Convert anything to PNG
sips -s format png input.heic --out output.png

# To WebP (macOS Sonoma+)
sips -s format webp input.jpg --out output.webp

Supported formats: jpeg, png, tiff, gif, pdf, bmp, pict, psd, qtif, sgi, tga, webp (newer macOS).

3. Compress with quality control

# JPEG at quality 80 (out of 100)
sips -s formatOptions 80 -s format jpeg input.png --out output.jpg

# Maximum compression (smallest file)
sips -s formatOptions low input.jpg --out output.jpg
# Options: 'low', 'normal', 'high', 'best', or 0-100 integer

4. Strip metadata

# Remove EXIF, GPS, and color profile from JPEG
sips -d all input.jpg --out output.jpg

# Remove just the ICC color profile
sips -d profile input.jpg --out output.jpg

The -d flag deletes things. -d all is the privacy-friendly default for anything you'll share publicly.

5. Rotate or flip

# Rotate 90° clockwise
sips -r 90 photo.jpg --out rotated.jpg

# Flip horizontally
sips -f horizontal photo.jpg --out flipped.jpg

# Flip vertically
sips -f vertical photo.jpg --out flipped.jpg

6. Get image info

# Show dimensions, format, file size, etc.
sips -g all photo.jpg

# Just dimensions
sips -g pixelWidth -g pixelHeight photo.jpg

Output goes to stdout — easy to parse in scripts.

7. Batch a folder

# Resize all JPEGs in a folder
for f in ~/Photos/*.jpg; do
  sips -Z 1200 "$f" --out "${f%.jpg}-small.jpg"
done

Or with output to a subfolder:

mkdir -p _resized
for f in *.jpg; do
  sips -Z 1200 "$f" --out "_resized/$f"
done

8. Convert a folder of HEIC to JPEG

mkdir -p _jpeg
for f in *.heic *.HEIC; do
  [[ -f "$f" ]] || continue
  sips -s format jpeg "$f" --out "_jpeg/${f%.*}.jpg"
done

This is the script I use for sending iPhone photos to non-Apple people. About 50× faster than opening them in Preview and exporting one by one.

9. Crop and pad

# Crop to 1080x1080 centered (e.g., for Instagram)
sips -c 1080 1080 photo.jpg --out square.jpg

# Pad to 1080x1080 with a color (white background)
sips -p 1080 1080 --padColor FFFFFF photo.jpg --out padded.jpg

Real-world recipes

Compress images for the web before publishing

#!/usr/bin/env bash
# Compress every JPEG/PNG in a folder to web-friendly quality 80
# Output: ./_web/ subfolder
set -euo pipefail

INPUT="${1:-.}"
mkdir -p "$INPUT/_web"

shopt -s nocasematch
for f in "$INPUT"/*.{jpg,jpeg,png,heic}; do
  [[ -f "$f" ]] || continue
  name="$(basename "$f")"
  out="${name%.*}.jpg"
  sips -s format jpeg -s formatOptions 80 -d all -Z 2400 "$f" --out "$INPUT/_web/$out" >/dev/null
  echo "  → $out"
done

Drop in ~/bin/compress-for-web, chmod +x, then:

compress-for-web ~/Desktop/product-shots

Done. Folder of compressed, metadata-stripped, max-2400px JPEGs ready to upload.

Convert iPhone Live Photos to plain JPEG

iPhone Live Photos are actually .heic + .mov pairs. To extract just the still:

for f in *.HEIC; do
  sips -s format jpeg -s formatOptions 90 "$f" --out "${f%.HEIC}.jpg"
done

Resize a screenshot folder for documentation

# Resize screenshots to a max 1200px (good for blog posts)
# and put output in same folder with -1200 suffix
for f in screenshots/*.png; do
  base="${f%.png}"
  sips -Z 1200 "$f" --out "${base}-1200.png"
done

Watermark a folder via Automator + sips

The "Run Shell Script" action in Automator can pipe images through sips. Useful for Quick Action services in Finder. Right-click → Quick Actions → "Resize 1080" runs a tiny sips script. Setup once, used forever.

Hazel rule: auto-compress new downloads

If you use Hazel, a rule like:

If file is added AND extension is jpg or jpeg or png AND size > 500 KB
  Run shell script with embedded:
    sips -s formatOptions 80 -Z 2400 "$1" --out "$1"

Auto-compresses every large image you save to a folder. Set this on Downloads and you'll never accidentally email a 12 MB JPEG again.

Where sips loses

Three places where sips isn't the right tool:

1. Maximum-compression JPEG. MozJPEG (via ImageOptim) produces 5-15% smaller files at the same visual quality. If absolute bytes matter, ImageOptim wins.

2. AVIF / JPEG XL output. sips can read modern formats but write support lags. If you need to output AVIF, use Squoosh (single images, no HEIC input) or QuickPix (which wraps sips + adds modern format export).

3. Live before/after preview. sips is CLI-only. For visual quality verification, you need a GUI tool with a slider.

Why I built QuickPix on top of sips

Full disclosure: QuickPix is one of the apps I make. It's a Mac-native GUI wrapper that uses sips as the engine, plus adds:

  • Drag-and-drop UX (no shell required)
  • Pre-built presets (Maximum Compression, Recommended, Web Optimized, Lossless)
  • Before/after slider for visual verification
  • Folder watching (auto-compress new files in a folder)
  • Modern format export (HEIC, WebP, AVIF read)
  • Color profile preservation
  • Batch processing with progress

If you live in the terminal, sips is the right answer. If you don't, QuickPix is the smoothest way to use the same engine.

Honest QuickPix vs ImageOptim comparison →

Closing

sips is one of the macOS quiet superpowers. Most developers I know learned it the day they needed batch resize for a one-off, then forgot it. Adding it to your tool belt pays for itself the second time you need to convert a folder of HEICs.

Pin this guide. Or — if shell isn't your environment — try QuickPix for the same engine with a drag-drop UI. Free tier handles most use cases.

Frequently asked questions

Is sips installed by default on macOS?

Yes. sips ships in /usr/bin/sips on every macOS install going back to OS X Panther (2003). You don't need to install anything — open Terminal and type sips to see the help. It's part of the OS, not a third-party tool.

Can sips compress HEIC files?

Yes. macOS sips natively supports HEIC encoding and decoding since macOS High Sierra. Both sips -s format heic input.jpg --out output.heic (convert to HEIC) and sips -s formatOptions 80 input.heic --out smaller.heic (compress HEIC in place) work.

Does sips support AVIF or JPEG XL?

sips can READ modern formats including AVIF (macOS Ventura+) but write support is limited. For outputting AVIF or JPEG XL, use Squoosh, ImageMagick, or a GUI tool like QuickPix. For everyday HEIC, WebP, PNG, JPEG — sips handles it all.

How do I batch resize a folder with sips?

A simple shell loop: for f in *.jpg; do sips -Z 1200 "$f" --out "_resized/$f"; done. Make a _resized/ folder first with mkdir -p _resized. This resizes every JPEG to a maximum dimension of 1200px while preserving aspect ratio. Add -s formatOptions 80 for compression at quality 80.

Is sips faster than ImageOptim or TinyPNG?

For batch operations, sips is the fastest because it's a CLI tool with no UI overhead — it'll process 100 images in 5-10 seconds. ImageOptim is competitive on per-image speed but has UI overhead. TinyPNG is server-side, so total time depends on upload/download bandwidth (often slower than sips for large batches).

---

Working through a folder cleanup? The natural companions to sips loops are batch-renaming the files first so the output names make sense, and choosing the right target format before you convert.

#macos#sips#command-line#image-processing#mac#terminal

Written by

Peter Zhang

Building local-first Mac & iOS productivity apps at Obelisk Club.