tinify / magento2-plugin

Speed up your Magento 2 webshop. Optimize your JPEG and PNG images automatically with TinyPNG.
MIT License
43 stars 9 forks source link

Magento 2 Console CLI feature #4

Open alexander-sibert opened 7 years ago

alexander-sibert commented 7 years ago

I have a Magento 2 System with circa 2.000 pictures which needs to be optimized through TinyPNG service.

It will be awesome to have a bin/magento CLI method for batch compressing product pictures.

rolftimmermans commented 7 years ago

Hi!

All existing images should be compressed if you clear the image cache. The compression will happen once the images are accessed via your website frontend. A batch compression feature might still be nice (if images can be compressed in the background), but in any case there is no manual work involved right now. Hope this helps!

alexander-sibert commented 7 years ago

Thank you. But it means everytime if i refresh/empty the image cache of Magento 2 it compress all images new and produce through this costs at TinyPNG Service?

michielverkoijen commented 7 years ago

Hello Alexander, the optimized images will be stored in a separate "optimized" folder, so if you flush the cache and Magento regenerates the images then these will probably not be optimized again as they are still there. It is essentially the same as will happen with duplicate images.