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 »

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 »

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 »

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 »

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 »

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 »

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 »

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 »

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 »

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 »

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 »

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