Mogrify is an image tool that comes with ImageMagick. It is useful for resizing, compressing, etc. If you have a set of subdirectories to run it on, run
$ find /start/dir -name "*.jpg" -exec mogrify -some_option {} \;

Linux.Shell - Mac.Shell - Media