Reducing image size with command line

With the command below

mogrify -path . -strip -quality 50% *.jpg

I reduces the size of the following images

-rwxrwxrwx 1 def def 4.0M Apr  9 16:48 20250409_164822.jpg*
-rwxrwxrwx 1 def def 3.6M Apr  9 16:48 20250409_164831.jpg*
-rwxrwxrwx 1 def def 4.2M Apr  9 16:49 20250409_164902.jpg*
-rwxrwxrwx 1 def def 4.1M Apr  9 16:49 20250409_164910.jpg*
-rwxrwxrwx 1 def def 3.7M Apr  9 16:49 20250409_164917.jpg*
-rwxrwxrwx 1 def def 3.8M Apr  9 16:49 20250409_164924.jpg*

as follows:

-rwxrwxrwx 1 def def 678K Apr  9 16:58 20250409_164822.jpg*
-rwxrwxrwx 1 def def 547K Apr  9 16:59 20250409_164831.jpg*
-rwxrwxrwx 1 def def 793K Apr  9 16:58 20250409_164902.jpg*
-rwxrwxrwx 1 def def 755K Apr  9 16:59 20250409_164910.jpg*
-rwxrwxrwx 1 def def 566K Apr  9 16:59 20250409_164917.jpg*
-rwxrwxrwx 1 def def 594K Apr  9 16:59 20250409_164924.jpg*

1 Response to Reducing image size with command line

  1. dmitriano says:

    reduce image size using imagemagick for batch of images
    https://stackoverflow.com/questions/24949892/reduce-image-size-using-imagemagick-for-batch-of-images

    To specify a maximum file size, mogrify -define jpeg:extent=300kb *.jpg. However, this can be much slower than just -quality 50% and/or -resize 50%

Leave a Reply

Your email address will not be published. Required fields are marked *