PHPackages                             darshiltech/magento2-product-image-cleaner - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. darshiltech/magento2-product-image-cleaner

ActiveMagento2-module[File &amp; Storage](/categories/file-storage)

darshiltech/magento2-product-image-cleaner
==========================================

Magento 2 CLI module to delete unused product images from the filesystem and database.

1.0.0(9mo ago)1121MITPHPPHP &gt;=7.3

Since Aug 2Pushed 9mo agoCompare

[ Source](https://github.com/DarshilTech/magento2-product-image-cleaner)[ Packagist](https://packagist.org/packages/darshiltech/magento2-product-image-cleaner)[ RSS](/packages/darshiltech-magento2-product-image-cleaner/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

DarshilTech\_ImageCleaner
=========================

[](#darshiltech_imagecleaner)

A Magento 2 CLI module to find and delete unused product images from the filesystem and database. This helps free up storage space and keep your product catalog media clean.

---

🧩 Features
----------

[](#-features)

- Adds a custom CLI command: `catalog:images:delete:unused`
- Deletes product images that are no longer associated with any product
- Optional `--limit` parameter to control how many images are removed per run

---

📦 Installation
--------------

[](#-installation)

### Using Composer (recommended for Packagist users)

[](#using-composer-recommended-for-packagist-users)

```
composer require darshiltech/magento2-product-image-cleaner
```

Then, run Magento's setup commands:

```
php bin/magento module:enable DarshilTech_ImageCleaner
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento cache:flush
```

---

⚙️ Usage
--------

[](#️-usage)

Run the CLI command to delete unused product images:

```
php bin/magento catalog:images:delete:unused
```

Optional: You can limit the number of images deleted in a single run:

```
php bin/magento catalog:images:delete:unused --limit=100
```

Default limit: 500

---

🗂️ Command Reference
--------------------

[](#️-command-reference)

CommandDescription`catalog:images:delete:unused`Deletes unused product images`--limit=500`Optional limit of images to delete per run---

🧠 Requirements
--------------

[](#-requirements)

- Magento 2.3 or higher
- PHP 7.3 or higher (compatible with Magento version)

---

🧑‍💻 Author
----------

[](#‍-author)

**DarshilTech**
GitHub: [github.com/DarshilTech](https://github.com/darshiltech)

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance57

Moderate activity, may be stable

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity31

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

283d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/616bf4cd20617a1f145b54abe3787fd907729eda96e64500f10b8f3524bf7671?d=identicon)[DarshilTech](/maintainers/DarshilTech)

---

Top Contributors

[![DarshilTech](https://avatars.githubusercontent.com/u/128693665?v=4)](https://github.com/DarshilTech "DarshilTech (2 commits)")

### Embed Badge

![Health badge](/badges/darshiltech-magento2-product-image-cleaner/health.svg)

```
[![Health](https://phpackages.com/badges/darshiltech-magento2-product-image-cleaner/health.svg)](https://phpackages.com/packages/darshiltech-magento2-product-image-cleaner)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
