The Linux mogrify command (part of ImageMagick) is a handy way to compress / resize a image, or multiple images easily using the CLI. mogrify can also be used for convert or compress images.
Batch Resize Images on Linux Using Mogrify (ImageMagick)
4