Reputation: 13
There are >60k images 10KB-1MB size and i need them all weighing <80KB, how do i go about this? Can't open so many images with preview. I guess there is a solution for this in terminal
Upvotes: 0
Views: 190
Reputation: 208077
First install ImageMagick and GNU Parallel with homebrew:
brew install imagemagick
brew install parallel
Then go to the directory where the images are and create an output directory:
cd where/the/images/are
mkdir output
Now run ImageMagick from GNU Parallel
find . -name "*.jpg" -print0 | parallel -0 magick {} -define jpeg:extent=80kb output/{}
Upvotes: 3