Posted on

Delete all images in pub/media/catalog/product not linked to any product

I am facing a website wich media directory size is 88 GB, and that is getting problems with the server and some processes. After analyzing the product date, I determined that in this directory exists so many images that are not assigned to any product in the database. Is there any way to get all those images not linked to a product and delete them?

Leave a Reply

Your email address will not be published. Required fields are marked *