jpegoptim (utility to optimize/compress JPEG files) jpegoptim is used to optimize/compress jpeg files. It supports lossless optimization (based on optimizing the Huffman tables) and so called "lossy" optimization where in addition to optimizing the Huffman tables, the user can specify an upper limit for image quality, or a target file size.