Deleting a product in Magento does not delete the images it stores on the server. These images will probably stay there forever clogging up your disk space.
Hungersoft's Product Image Cleaner extension allows you to delete these unused product images easily from your Magento admin.
composer config repositories.hs-module-all vcs https://github.com/hungersoft/module-all.git
composer config repositories.hs-module-image-clean vcs https://github.com/hungersoft/magento2-image-clean.git
composer require hs/module-image-clean:dev-master
php bin/magento module:enable HS_All HS_ImageClean
php bin/magento setup:upgrade
Note: Make sure you've installed our Base extension. The above commands already include it, but if you haven't, you can find it here
Magento 2 Product Image Cleaner extension is provided for free by Hungersoft. Feel free to contact Hungersoft at [email protected] if you are facing any issues with this extension. Reviews, suggestions and feedback will be greatly appreciated.