Optimize JPEGs for web

While creating my new homepage on https://mbo.dev I was looking for a command line tool to optimise images. Best tool for the job seemed to be imagemagic in combination with mozjpeg.

Here the command I used which brought the images down very very much:

convert old.jpg pnm:- | cjpeg -quality 70 > new.jpg

The quality may change but I couldn’t see the difference without zooming. So it wasn’t obvious to me.