One of the big challenges in SEO optimization occurs when the quality of images is very important for customers. for example when customer buying layette for their children, color of image is important things in world!

so we can’t reduce size of images easily and unfortunately we face of problem of huge images and bad SEO.

Wordpress CMS by default reduce size of images but in these cases reduce image size by Wordpress maybe change in color, so i have different solution for this problem.

Don’t use these methods for every website, it’s using only when customers are very sensitive to products color or some designer force team to watch picture with high quality.

Download all images from website

usually, these operation running with Filezilla FTP or SCP Linux command.

Find all files size is upper than 400KB then copy them into bigfiles folder

find ./ -type f -size +400k -exec cp -nv {} bigfiles/ \;

Converts all picture with width 400 px

mogrify -resize 400 *.png

mogrify -resize 400 *.jpg

mogrify -resize 400 *.jpeg

Many projects convert images after uploading in webserver but because of special situations here, we want to compare image with different width.