From Tim's website
Resize and compress all images in a directory
The following command will using the imagemagick command to resize and recompress images to a small file:
mogrify -resize 800x800 -quality 10 -monitor *
The following command will using the imagemagick command to resize and recompress images to a small file:
mogrify -resize 800x800 -quality 10 -monitor *