Removing Meta Data from Images; Achieve Higher Image Compression

$ exiftool -all= -overwrite_original_in_place IMAGE.jpg
$ mogrify -strip IMAGE.jpg

The above commands strip extra data (called metadata–read more about photo meta data)

The two commands are:
ExifTool which is available for download via most package managers or here.
Mogrify, which is part of the imagemagick library. You can read more about mogrify options here, and install imagemagick via your choice of package managers.

Any digital photos, or images, will now always include a plethora of extra data stored inside image file. Having that data stored inside you photos can be extremely helpful for applications, as they provide information on how to display the images, where the images were taken, copyright, license, programs that created the photo or image. But, if you are trying to reduce the filesize of an image or photo, it’s best to get rid of all the extra bytes you don’t absolutely need. Most image optimization programs will remove the meta data. But, in some scenarios of image compression programs, removing meta data before compression will result in a higher reduction of image size after compression.