n0xx
n0xx

Reputation: 13

How to compress (resize?) >60k images on mac?

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

Answers (1)

Mark Setchell
Mark Setchell

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

Related Questions