Need to Resize Thousands of Images on Apache Server

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
horizon70s
Posts: 1
Joined: 2016-09-07T09:30:45-07:00
Authentication code: 1151

Need to Resize Thousands of Images on Apache Server

Post by horizon70s »

Greetings,

We have a directory, on our apache server, that has thousands of images that are around 2500x1500 pixels in Width. We're in need to have these resized to a max of 2000 pixels, either width or height, and have them maintain the same name/location structure.

I'm just a bit nervous about making a mistake, as these are our images used to sell on Amazon so it's important.

I appreciate your time looking. We're a small E-commerce company based in Bismarck, North Dakota (usa).

Thanks

Chris
701-866-1909
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: Need to Resize Thousands of Images on Apache Server

Post by dlemstra »

The keyword here is making a backup before you start your resize action. The following should do the trick:

Code: Select all

mogrify -resize 2000x2000\> *
p.s. Why was this message posted in the consulting part?
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Need to Resize Thousands of Images on Apache Server

Post by fmw42 »

If they are not all in the same directory level (not subdirectories that have to be traversed), then the mogrify solution will work. Otherwise, you need to write a unix shell script to loop over your directory tree for each folder that has those images and then run mogrify on each folder.

Please always provide your IM version and platform (in this case Linux I presume!

I have moved this to the Users forum, since you do not mention PAID consulting.
Post Reply