Resample Image Dimensions with sips
Shrink images on macOS from the terminal using sips -Z (aspect-preserving) or sips -z (exact dimensions).
Run `sips -Z 1600 photo.jpg` to scale the longest edge down to 1600px, or `sips -z 1080 1920 photo.jpg` for exact pixel dimensions.
01Command
Command
$ sips -Z 1600 photo.jpg && sips -z 1080 1920 banner.jpg02What it does
The -Z flag keeps the aspect ratio and constrains only the largest dimension, which is what you want for thumbnails and email attachments. The -z flag resamples to exactly the height and width given, distorting the image if the ratios differ. Resampling discards pixels, so downscaling is safe but upscaling will soften the image; copy the file first if you need the full-size original.
03Risk
!Warning: Resampling overwrites the file and discards original pixels — keep a copy of the full-size image.
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- sips — scriptable image processing system (macOS man page)Evidence: Documents sips -Z pixels (resample so max dimension fits, preserving aspect ratio) and sips -z h w (resample to exact height and width).
Last verified: 2026-09-17 · Category: Media