Page 1 of 1

Resizing all my jpg Images in Wordpress Uploads Folder

Posted: 2019-10-11T01:26:47-07:00
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

Re: Resizing all my jpg Images in Wordpress Uploads Folder

Posted: 2019-10-11T07:09:56-07:00
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.

Re: Resizing all my jpg Images in Wordpress Uploads Folder

Posted: 2019-10-11T07:16:56-07:00
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

Re: Resizing all my jpg Images in Wordpress Uploads Folder

Posted: 2019-10-11T07:21:16-07:00
by sallida
What will Imagemagick do with the Imagefiles, when running the Optimize Command again over all Files?

Re: Resizing all my jpg Images in Wordpress Uploads Folder

Posted: 2019-10-11T07:31:59-07:00
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"?

Re: Resizing all my jpg Images in Wordpress Uploads Folder

Posted: 2019-10-11T07:49:11-07:00
by sallida
Lets say I run the command convert -quality 70 *.jpg over all Files twice, will imagemagick process the already optimised Images again

Re: Resizing all my jpg Images in Wordpress Uploads Folder

Posted: 2019-10-11T08:29:05-07:00
by snibgo
Yes.

Re: Resizing all my jpg Images in Wordpress Uploads Folder

Posted: 2019-10-11T08:31:32-07:00
by sallida
Means, if the command will be executed more times, the Image quality get worst and worst with every run??

Re: Resizing all my jpg Images in Wordpress Uploads Folder

Posted: 2019-10-11T08:42:06-07:00
by snibgo
Yes.

Re: Resizing all my jpg Images in Wordpress Uploads Folder

Posted: 2019-10-11T08:47:19-07:00
by sallida
Is there no option, to set somehow to prevent this?

Re: Resizing all my jpg Images in Wordpress Uploads Folder

Posted: 2019-10-11T08:59:17-07:00
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.