How to optimize existing Product images via commandline, similar to resize command.

php bin/magento catalog:images:resize

https://docs.magento.com/user-guide/catalog/product-image-resizing.html This is Magento documentation regarding Javascript optimization & Resize options for Product images at Upload time.

My query is how to optimize existing Product images, if I change Javascript optimization in Adminpanel to 90%, so it will only affect, further uploaded images via AdminPanel.

What about existing Images, how to batch process existing images?

Although, there is a resize command in Magento, is there a bulk optimize Magento command?

1 Answer 1


Another very important point on SEO is the optimization and compression of images on the site. Here is an interesting article on this topic: https://optipic.io/en/blog/images-seo-optimization/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.