Magento 2, How to delete unused images using php script
-
05-10-2020 - |
Question
I have more than 50,000 images in pub/media of products.
But there are so many unused images so I want to remove all images which are not associated with any product.
For magento 1.9.x this can be a Reference link but i want the same php script for magento 2.1.
La solution
You can use the Hackathon EAV cleaner module for this. After installation you can use the command eav:media:remove-unused
You can find it on Github: https://github.com/magento-hackathon/EAVCleaner/tree/magento2
Licencié sous: CC-BY-SA avec attribution
Non affilié à magento.stackexchange