Use the following command to optimise a JPG and make it progressive:
$ convert -strip -interlace Plane -quality 80 input-file.jpg output-file.jpgBatch all the images in a folder like this:
$ for i in source/images/backgrounds/*.jpg; do convert -strip -interlace Plane -quality 80 $i $i; done