Read Image Metadata with sips -g

Query pixel size, color space, DPI, and format of any image from Terminal — no Preview needed.

macOSmetadataimagessipsLow risk
Run `sips -g pixelWidth -g pixelHeight -g space -g dpiWidth image.jpg` to print the image's dimensions, color space, and DPI.

01Command

Command
$ sips -g pixelWidth -g pixelHeight -g space -g dpiWidth image.jpg

02What it does

Beyond format conversion, sips is a full property engine: -g <property> fetches one property and `sips -g all image.jpg` dumps everything, including EXIF-ish data like creation date. It can also modify metadata in place — `-s dpiHeight 300 -s dpiWidth 300` rewrites DPI without touching pixels, and -r rotates. Combine with find/xargs to audit a whole folder of images in one line.

03Risk

RiskLow risk
RequirementsBuilt-in on macOS.

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

Last verified: 2026-09-17 · Category: Media

06Related solutions