Lower quality of a folder of pictures for the Web

To convert a batch of images for the Web : for X in *.JPG; do convert “$X” -scale 20% -size 24% -strip -quality 86 “$X”; done

will replace the pictures and delete the originals