Showing results for 
Search instead for 
Did you mean: 

remove un-assigned product images from media

remove un-assigned product images from media

one of my clients is having a store with 30k+ products, recently, he got product photography and uploaded new images to the magento 2 backend. Now all the previous product images occupy 7 GB space in media folder but it got messed up with similar names of new and old product images.

I'm looking for a solution or a module which can identify un-assigned product images from the database and remove them to avoid the manual task of looking into each separately.

I want to make sure that the correctly used images are not deleted and in the process of deletion, the database isn't crashed.

Suggest me some good solutions or modules.


Re: remove un-assigned product images from media


I think by un-assigned product images, you mean un-used product images which are occupying extra space to make the media folder bulky.

Explore our Magento 2 image clean extension to satisfy your requirement of removing images from media catalog which are no longer in use. 


Have a look at the live demo to check the functionality you are looking for.

If you've found my answer useful, please give"Kudos" and "Accept as Solution"

Re: remove un-assigned product images from media

Hi there,

you can use Store Manager for Magento (there's a trial version available free for 14 days) to run store diagnostics for images and troubleshoot the issues. There are three options:

  • detect missing and broken images
  • images not linked to any product
  • products without any image

Re: remove un-assigned product images from media


If you are searching for an extension that helps you clean the image, we highly recommend the one from Landofcoder. Please check it out here.


Good luck to you!



Bavaan team.