tjko / jpegoptim

jpegoptim - utility to optimize/compress JPEG files
http://www.iki.fi/tjko/projects.html
GNU General Public License v3.0
1.56k stars 116 forks source link

size option and batching multiple files #124

Closed soundsbeard closed 1 year ago

soundsbeard commented 1 year ago

can please someone explain. what do i do wrong?

i have a folder with 30 images, in terminal i specify the size of 8mb: $ jpegoptim --size=8k *.jpg

i expect that each file will be compressed to 8000kb, but instead all files are compressed in a way, that the whole folder is 7.9mb. how do i do it correctly?

tjko commented 1 year ago

--size option doesn't understand 'k' suffix, so you would want to use something like --size=8192 (or --size=8000)

soundsbeard commented 1 year ago

thank you. for whatever reason, many manuals on internet showcasing --size option with k.

for example: https://www.nexcess.net/help/how-to-optimize-jpegs-pngs-and-gifs-from-the-cli/ https://linuxcommandlibrary.com/man/jpegoptim https://vitux.com/optimize-jpeg-jpg-images-in-ubuntu-with-jpegoptim/