Batch resize jpg image via bash (linux)

Install imagemagick

Now, run:

mogrify -resize 640x480 *.jpg

 

To change the quality of jpg:

mogrify -quality 80 *JPG

The commands can be combined:

mogrify -quality 80 -resize 640x480 *JPG