Resizing all my jpg Images in Wordpress Uploads Folder

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
sallida
Posts: 6
Joined: 2019-10-11T01:10:12-07:00
Authentication code: 1152

Resizing all my jpg Images in Wordpress Uploads Folder

Post by sallida » 2019-10-11T01:26:47-07:00

Hello,

I'm using centos 7.6 with Plesk Onyx. I have installed ImageMagick 6.7.8-9. I would like to optimise all my Images again.

What command should be used, convert or mogrify?

I would like to remove the Exif Data from the Images, but leave the color profiles, is there a alternative for -strip

Another question is, if I run the convert or mogrify command to optimize, is ImageMagick checking before if the Images are already Optimized? If I have Image Files what already Optimized by a other Tool, will Imagemagick check this, or just apply the set quality level?

Is there also a parameter to set via command line, where showing the processing of the Images?

Thanks
Regards
Sallida

snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Resizing all my jpg Images in Wordpress Uploads Folder

Post by snibgo » 2019-10-11T07:09:56-07:00

sallida wrote:I have installed ImageMagick 6.7.8-9.
That is very old. I suggest you install a current version.
sallida wrote:What command should be used, convert or mogrify?
If the command is simple, mogrify would work. Otherwise, use convert to process one file at a time, and put that in a shell loop.
sallida wrote:I would like to remove the Exif Data from the Images, but leave the color profiles, is there a alternative for -strip
You can save the profile, then strip, then assign the profile.
sallida wrote:Another question is, if I run the convert or mogrify command to optimize, is ImageMagick checking before if the Images are already Optimized?
These are JPG files, right? What do you mean by "optimized"?
sallida wrote:Is there also a parameter to set via command line, where showing the processing of the Images?
Perhaps "-monitor" does what you want.
snibgo's IM pages: im.snibgo.com

sallida
Posts: 6
Joined: 2019-10-11T01:10:12-07:00
Authentication code: 1152

Re: Resizing all my jpg Images in Wordpress Uploads Folder

Post by sallida » 2019-10-11T07:16:56-07:00

Hello,

thanks for the update on this. The Version is shipped with Plesk Onyx on Centos, I have to see how to update to the actual stable version.

Yes, all the Files are JPG Files, I mean with Optimized if Imagemagick do a check before, like if a File is already compressed to the maximum by a 3rd party plugin, if the file then will be skipped?

Thx
Sallida

sallida
Posts: 6
Joined: 2019-10-11T01:10:12-07:00
Authentication code: 1152

Re: Resizing all my jpg Images in Wordpress Uploads Folder

Post by sallida » 2019-10-11T07:21:16-07:00

What will Imagemagick do with the Imagefiles, when running the Optimize Command again over all Files?

snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Resizing all my jpg Images in Wordpress Uploads Folder

Post by snibgo » 2019-10-11T07:31:59-07:00

sallida wrote:...like if a File is already compressed to the maximum by a 3rd party plugin...
Maximum compression is a really bad idea. The result will look awful. JPEG compression is a trade-off between image quality and file size. Smaller files have worse image quality.
sallida wrote:What will Imagemagick do with the Imagefiles, when running the Optimize Command again over all Files?
What "Opimize Command"?
snibgo's IM pages: im.snibgo.com

sallida
Posts: 6
Joined: 2019-10-11T01:10:12-07:00
Authentication code: 1152

Re: Resizing all my jpg Images in Wordpress Uploads Folder

Post by sallida » 2019-10-11T07:49:11-07:00

Lets say I run the command convert -quality 70 *.jpg over all Files twice, will imagemagick process the already optimised Images again

snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Resizing all my jpg Images in Wordpress Uploads Folder

Post by snibgo » 2019-10-11T08:29:05-07:00

Yes.
snibgo's IM pages: im.snibgo.com

sallida
Posts: 6
Joined: 2019-10-11T01:10:12-07:00
Authentication code: 1152

Re: Resizing all my jpg Images in Wordpress Uploads Folder

Post by sallida » 2019-10-11T08:31:32-07:00

Means, if the command will be executed more times, the Image quality get worst and worst with every run??

snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Resizing all my jpg Images in Wordpress Uploads Folder

Post by snibgo » 2019-10-11T08:42:06-07:00

Yes.
snibgo's IM pages: im.snibgo.com

sallida
Posts: 6
Joined: 2019-10-11T01:10:12-07:00
Authentication code: 1152

Re: Resizing all my jpg Images in Wordpress Uploads Folder

Post by sallida » 2019-10-11T08:47:19-07:00

Is there no option, to set somehow to prevent this?

snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Resizing all my jpg Images in Wordpress Uploads Folder

Post by snibgo » 2019-10-11T08:59:17-07:00

Not within IM. In a shell script, for each file, you could find the current compression "quality" level. If it is more than 70, then run the command to compress it.
snibgo's IM pages: im.snibgo.com

Post Reply