Log in
Model

MediaImageDeleteProcessor

Magento\Catalog\Model\ResourceModel\MediaImageDeleteProcessor

What it does

This class handles the cleanup of product images from the media gallery and filesystem when a product is deleted.

It ensures that image files are only physically deleted if they are not being used by any other products, preventing accidental removal of shared images.

Developers would typically use this class as part of the product deletion workflow to maintain filesystem integrity.

Public Methods

  • execute()