Need to Change product image file size while uploading image
Image compress to less than 200kb
Hi @akshaykamba454
Kindly refer below link for resize image while uploading:
https://docs.magento.com/user-guide/catalog/product-image-resizing.html
It may help you.
If issue resolve, please click on 'Kudos' & Accept as Solution!
@Bhanu Periwal I want to automatically resize the images to below 150K after uploading
Hi @akshaykamba454
You can this command for resize all images automatically:
php bin/magento catalog:images:resize
It may help you.
If issue resolve, please click on 'Kudos' & Accept as Solution!
@Bhanu Periwal Thanks for reply
I have checked above that seems to be correct
Is there anyway while uploading image get compress or resize??
@akshaykamba454
You can compress images directly by run below command:
# apt-get install jpegoptim or $ sudo apt-get install jpegoptim
Kindly refer below link :
https://www.tecmint.com/optimize-and-compress-jpeg-or-png-batch-images-linux-commandline/
It may help you.
If issue resolve, please click on 'Kudos' & Accept as Solution!
Have you tried to convert images to WebP format with the Magento 2 WebP Images Extension?
With this module, you can set the % of quality yourself and by that define the size of the image. And there is not only an automatic conversion but manual and 2 other conversion types in case you want to try some other way.
It will definitely improve your website loading speed if that's your main goal.