Auto remove images from WordPress media gallery

This feature is a part of Product Gallery Advanced. Click here to see all Product Gallery Advanced features.

The option to automatically remove the images from the media gallery when the product is deleted is located in Catalog Settings > Catalog Design > Single Page Design:

Automatically remove images checkbox

Once you check the Remove images when product is deleted, checkbox and save the settings, the images attached to the product will be automatically removed when you delete it.

Please note that the image will be removed from the server and media gallery when:

  1. It is not used in the content elsewhere.
  2. It is not used as a featured image elsewhere.
  3. It is not used in the eCommerce Product Catalog or WooCommerce gallery on any product.