> sips -Z 200 *.jpg
The -Z tells to utility to maintain aspect ratio
The 200 can be changed to any maximum height/width (in pixels)
The *.jpg tells the utility to resize all jpg files in the current directory. This can be changed to *.png, *.gif, etc.
You can also change the format of a folder of images by running the following command:
> for i in *.jpg; do sips -s format png $i --out $i.png;done
This would convert all jpg images to png.