How to resize an image on Mac with sips or a browser
Published
Here is how to resize an image on Mac with nothing extra installed: open Terminal and run sips -Z followed by the longest side you want in pixels, the file name, and --out with a new name. sips keeps the shape of the picture. If you would rather not use Terminal, a browser resizer does the same job in Safari, and the file stays on your Mac.

Resize the image in your browser
sips is the Scriptable Image Processing System in macOS (ss64.com sips reference). It runs in Terminal, so there is nothing to download. This page shows the sips commands, the pixel and ppi maths behind them, and the browser route.
How do you resize an image on a Mac?
Run one sips command in Terminal, or drop the file into a browser resizer. For the Terminal route, follow these steps:
- Open Terminal. Apple's Terminal User Guide says: In the Finder, open the /Applications/Utilities folder, then double-click Terminal.
- Type
cd, a space, and drag the folder that holds the photo into the window, then press Return. - Check the current size with
sips -g pixelWidth -g pixelHeight photo.jpg. - Run
sips -Z 1200 photo.jpg --out photo-small.jpg, with your own file name and longest side. - Check the new file with the same
sips -gcommand as in step 3.
Pitfall: always give --out a new name if you might need the full-size photo later.
Should you change the pixels or only the ppi?
Change the pixels when you want a smaller file or need to meet an upload limit. Change only the ppi when you want a different print size and the same pixels. Guides disagree on this because they answer two different goals. The worked example below runs one phone-sized photo through both paths.
Starting photo Pixels: 4032 x 3024 = 12,192,768 pixels (about 12.2 megapixels) Resolution: 72 ppi (assumed here; read yours with: sips -g dpiWidth photo.jpg) Print size: 4032 / 72 = 56 in by 3024 / 72 = 42 in Path A: ppi changed to 300, pixels kept Pixels: 4032 x 3024 = 12,192,768 pixels (unchanged) Print size: 4032 / 300 = 13.44 in by 3024 / 300 = 10.08 in File: same pixels, so roughly the same file size Use it for: printing at a set size; uploads see no difference Path B: resampled, longest side set to 1200 px, shape kept Height: 3024 x (1200 / 4032) = 900 px Pixels: 1200 x 900 = 1,080,000 pixels Share kept: 1,080,000 / 12,192,768 = 8.9% of the original pixels Print size: at 72 ppi, 1200 / 72 = 16.67 in by 900 / 72 = 12.5 in Use it for: email, web pages, upload limits, smaller files
Path B in Terminal (fits the longest side to 1200 px): sips -Z 1200 photo.jpg --out photo-1200.jpg -> 4032 x 3024 becomes 1200 x 900 Path A in Terminal (changes ppi, keeps every pixel): sips -s dpiWidth 300 -s dpiHeight 300 photo.jpg --out photo-300ppi.jpg -> still 4032 x 3024, now 13.44 x 10.08 in when printed
The lesson from the example: ppi (pixels per inch) only tells a printer how large to print each pixel. A web page, a chat app or an upload form looks at the pixel count, so Path A changes nothing for them. Path B is the one that makes the file smaller. If you want a smaller file in KB at the same pixel size, compress it instead with the OptiPix Image Compressor.
How do you keep the aspect ratio when resizing?
Give sips one number with the capital -Z option, and it works out the other side from the original shape, as in Path B above. The ss64 sips reference describes the option as one that will Resample image so height and width aren’t greater than specified size (ss64.com sips reference). The lower-case sips -z takes a height and a width, and the same reference warns that with it the Image apsect ratio may be altered (the typo is in the source). If the two numbers do not match the original shape, the picture looks stretched or squashed.
How do you resize many images at once on a Mac?
Give sips a wildcard such as *.jpg and a folder for the results. The --out option accepts a result-file-or-dir (ss64.com), so every resized copy goes to a separate folder and the originals stay as they were:
cd ~/Desktop/photos mkdir resized sips -Z 1200 *.jpg --out resized
In the browser, the OptiPix Image Resizer page says Batch resizing is supported, so you can run a set of photos through the same settings without Terminal.
How to resize an image on Mac from the Terminal, with an exact size?
Use sips -z with the height first and the width second when a form asks for an exact size. Add --out with a new name so the result goes to a new file.
# Fit the longest side to 1200 pixels, keep the ratio, write a new file sips -Z 1200 photo.jpg --out photo-small.jpg # Set an exact size: height first, then width (the ratio can change) sips -z 900 1200 photo.jpg --out photo-exact.jpg # Check the pixel size and the ppi before and after sips -g pixelWidth -g pixelHeight -g dpiWidth photo.jpg
The ss64 reference lists pixelWidth integer (read-only), so sips reports the pixel width but does not let you type a new one directly; you change it with the resample options. The resolution key, dpiWidth float, can be set with -s, which is how the Path A command in the worked example changes ppi without touching the pixels.
Is resizing the same as cropping?
No. Resizing scales the whole picture up or down, so everything stays in the frame. Cropping cuts away the edges and keeps only part of the picture. When you need a set shape, such as a square from a landscape photo, crop to that shape first, then resize.
Making an image larger is the other trap. Resizing up spreads the same detail over more pixels, so it looks soft. The OptiPix resizer page puts it plainly: enlargements beyond ~150% soften noticeably (OptiPix Image Resizer).
Can you resize an image on a Mac without Terminal?
Yes. A browser tool works in Safari with no download. If you would rather not open Terminal, the OptiPix Image Resizer does the same resize in Safari and keeps the file on your Mac: the page says The resize runs locally in your browser at full quality with no upload. It maintains aspect ratio by default, so typing one side gives the matching other side.
The upload box on the page lists JPEG, PNG, WebP, HEIC, AVIF, TIFF (as of 1 December 2026). If a site you upload to wants JPEG and your photo is a HEIC file, the OptiPix HEIC to JPG converter makes the JPEG copy.