# 1. Description

Unused media files accumulate in every Shopware store over time — especially after product imports, layout changes, or manufacturer logo updates. While Shopware includes the `media:delete-unused` CLI command, most merchants don't have server access to run it.

**Media Cleanup Dashboard** brings this functionality directly into the Shopware Administration: a visual dashboard that safely identifies, displays, and deletes unused files — no command-line access required.

![Dashboard overview with unused media files](https://459847022-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LtiS3-dzuXFp_IH7yRw-1972196547%2Fuploads%2Fgit-blob-6edc8acf009fe7fcfbd403f0b5cbc1541b4801f5%2F1.png?alt=media)

## Features at a Glance

### Dashboard with File List

The dashboard displays all unused media files in a paginated list — with a preview thumbnail (or a file-type icon for PDFs, videos, etc.), file name, type, size, and upload date. A summary bar at the top shows the total file count and combined storage size at a glance.

### Bulk Selection and Safe Deletion

Select individual files via checkbox or use "Select all" — even across multiple pages. Before any deletion, a confirmation dialog shows the number of files and total size. A progress indicator is displayed during deletion; the result (deleted / skipped / failed) is reported in detail when complete.

![Confirmation dialog before deleting](https://459847022-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LtiS3-dzuXFp_IH7yRw-1972196547%2Fuploads%2Fgit-blob-ab448181cfb41a43767a7f40da146069247284bf%2F2.png?alt=media)

### Enhanced Detection

Shopware's core does not recognize preview images set on YouTube or Vimeo video CMS elements as "in use." Media Cleanup Dashboard closes this gap: preview images configured in video elements are correctly identified as used and will not appear in the deletion list — regardless of which page the video element is embedded on.

### Filters and Sorting

Filter the list by file type (image, video, document, other), minimum file size, or upload age. Sort by file name, file size, or date — ascending or descending. A single click resets all active filters.

![File type filter applied](https://459847022-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LtiS3-dzuXFp_IH7yRw-1972196547%2Fuploads%2Fgit-blob-030a2895126f17cc45bbc08dd75c368681bdb5ca%2F3.png?alt=media)

### User Permissions (ACL)

The plugin adds two separate privileges:

* **momo\_media\_cleanup:read** — access to the dashboard and the unused media list
* **momo\_media\_cleanup:delete** — permission to delete unused media files

Staff can review the list without having delete access.

## Technical Details

| Property               | Value                                                               |
| ---------------------- | ------------------------------------------------------------------- |
| Shopware compatibility | 6.6.x and 6.7.x                                                     |
| PHP                    | 8.2+                                                                |
| External services      | None — the plugin communicates only with your own Shopware instance |
| Database migrations    | None — the plugin does not create any custom tables                 |
