Update: 2026-10-28 – The command is now in a code block you can copy straight into the terminal, and there is a safer variant with --out that keeps your originals. sips still ships with every macOS. For the occasional resize, Finder can do it too, see the end of the post.
Some goodies you find out after years … and you had them on your system all the time. I found this by accident here on Lifehacker.
One of these goodies is “sips” for me - a utility that can change the size of images via commandline for OSX (today: macOS).
sips -Z 640 *.png-Z 640 scales every image so that its longest side is at most 640 pixels and keeps the aspect ratio.

That’s all you need :) fast and easy.
Attention: this tool alters the files you throw at it - and there is no UNDO. To keep the originals, write the resized copies into a separate folder:
mkdir resized
sips -Z 640 *.png --out resized/sips can do more - make sure you consult sips --help. Quality-wise I find the resized images a bit blurry compared to when I use my normal Lightroom export dialog for this.
No terminal at hand? Since macOS Monterey, Finder can do the same: select the images, right-click, Quick Actions, Convert Image, and pick a size. Fine for a handful of files, sips is still faster for whole folders and scripts.
