Log in
Model

DeleteAssetsByPaths

Magento\MediaGallery\Model\ResourceModel\DeleteAssetsByPaths

What it does

This class handles the deletion of media gallery assets from the database based on their file paths.

Developers use this when they need to remove media assets that match specific directory paths, such as during bulk cleanup operations or when removing entire folders of media files.

It implements batch deletion with error handling and validation to ensure paths are valid before removal.

Public Methods

  • execute()