I am looking for a way to compress jpeg images on a Mac from Terminal. Basically, a library like pngquant, except it is for jpeg format.
Are you aware of a software that does that?
I suggest using GraphicsMagick as it is smaller and faster than ImageMagic. The commands are generally the same with the only difference being that you prepend a
gm with the GraphicsMagick tool.
gm is the binary with the commands
mogrify, etc. are arguments where as IM, the same arguments are individual binaries.
The commands are as follows:
gm convert -quality X% source.jpg result.jpg
convert -quality X% source.jpg result.jpg
X is a positive integer value (i.e. 85 for 85%); source and result are the original filename and the output filename.