This pages explains how the media-module deletes media files from Shopware.

Asset Deletion

If an Asset contains a value for the deletedAt timestamp the corresponding media file will be removed from Shopware.

Delta Deletion

The field deleteShopwareOnlyFiles of any subsection determines if images are removed from Shopware if no corresponding asset is present in the transfer database. This removes manually added files from Shopware, so use this feature with caution.

Remove Empty Media

The module is able to remove media-entities that do not contain a media file. They can occur due to errors in the file uploading process, third party plugins or manual misconfigurations in the administration panel.

If you activate the configuration option subsections.removeEmptyMedia.enabled the module will clean up empty media entities before handling any assets and media operations.

    "subsections": {
        "removeEmptyMedia": {
            "enabled": false