OSX jpg resize in terminal

Batch resize images in terminal.  In example below 640 indicates the max width of resulting images.

1
sips -Z 640 *.jpg

source: https://lifehacker.com/batch-resize-images-quickly-in-the-os-x-terminal-5962420