PHPackages                             nathanday/module-catalog-images-clean - 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. nathanday/module-catalog-images-clean

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

nathanday/module-catalog-images-clean
=====================================

Magento 2 module to facilitate maintenance of catalog images

1.0.2(3y ago)322.8k↓50%3[5 issues](https://github.com/natedawg92/CatalogImagesClean/issues)proprietaryPHPPHP ~7.3.0||~7.4.0||^8.0

Since Jan 10Pushed 3y agoCompare

[ Source](https://github.com/natedawg92/CatalogImagesClean)[ Packagist](https://packagist.org/packages/nathanday/module-catalog-images-clean)[ RSS](/packages/nathanday-module-catalog-images-clean/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (2)Versions (4)Used By (0)

NathanDay CatalogImagesClean Extension
======================================

[](#nathanday-catalogimagesclean-extension)

Facts
-----

[](#facts)

- version: 1.0.0
- extension key: NathanDay\_CatalogImagesClean
- [extension on GitHub](https://github.com/natedawg92/CatalogImagesClean)

Description
-----------

[](#description)

Magento 2 Module to Clean Catalog Images able to Remove Unused Images from the file system and missing images from the database.

Requirements
------------

[](#requirements)

- PHP &gt;= 7.0.0
- Mage\_Core

Compatibility
-------------

[](#compatibility)

- Magento &gt;= 2.0

Installation Instructions
-------------------------

[](#installation-instructions)

```
composer config repositories.catalogimagesclean git git@github.com:natedawg92/CatalogImagesClean.git
composer require nathanday/module-catalog-images-clean
php bin/magento module:enable NathanDay_CatalogImagesClean
php bin/magento setup:upgrade

```

Uninstallation
--------------

[](#uninstallation)

```
php bin/magento module:uninstall NathanDay_CatalogImagesClean

```

Usage
-----

[](#usage)

**Info Command**

```
php bin/magento catalog:images:info
Description:
  Information about Unused and/or Missing Images

Usage:
  catalog:images:info [options]

Options:
  -u, --unused          Info on unused product images
  -m, --missing         Info on missing product images
  -t, --duplicate       Info on duplicate product images
  -d, --database        Info on Product images in the Database
  -p, --physical        Info on Product images in the filesystem
  -h, --help            Display this help message
  -q, --quiet           Do not output any message
  -V, --version         Display this application version
      --ansi            Force ANSI output
      --no-ansi         Disable ANSI output
  -n, --no-interaction  Do not ask any interactive question
  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

```

For Details of Unused, Missing and Duplicated images you do not need to specify any particular flag, if you want information on one or more, specify which flag you require

Sample Output

```

======================================
Catalog Product Image Information
======================================
53 Unique Images in Database
802 Images in Filesystem
0 Missing Images
749 Unused Images
78 Duplicate Images

```

for more detailed information add `-v` to the command and this will print out detailed information specific for each type.

- in the case of missing images the verbose flag will print a list of files and how many times that file appears in the gallery records.
- in the case of unused images this will print out a list of images that are present in the filesystem but not in the database
- in the case of duplicated date, this will print a list of images and what they are a duplicate of

**Clean Command**

```
php bin/magento catalog:images:clean

Description:
  Clean Catalog Images, Delete Unused Images in the Filesystem and/or Remove records in the Database for Missing Images

Usage:
  catalog:images:clean [options]

Options:
  -u, --unused          Delete unused product images
  -m, --missing         Remove missing product image Records
  -t, --duplicate       Remove duplicate product images and update database Records
  -d, --dry-run         Dry Run, don't make any changes
  -h, --help            Display this help message
  -q, --quiet           Do not output any message
  -V, --version         Display this application version
      --ansi            Force ANSI output
      --no-ansi         Disable ANSI output
  -n, --no-interaction  Do not ask any interactive question
  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug```

```

**Important**: Before utilising this command it is recommended to take a Database and Media Backup.

The clean command will process through all actions to clean up your catalog image files and database records. As with the info command you can specify an individual subset of images to clean e.g. `--missing` will only action the clean command for missing images.

you can specify the `--dry-run` flag which will print out what actions would be taken.

The verbose flag `-v` can also be added to the command to print a list of the Images or database records that will be updated.

When using this command without the `--dry-run` flag you will shown a recommendation to make an appropriate backup before proceeding at which point you will be asked to confirm you want to proceed.

after this point the command will proceed to Update your database to remove any instances of missing image records and/or Delete files from the media directory that are not associated with any product, depending on your choice of which subsets to clean.

Support
-------

[](#support)

If you have any issues with this extension, open an issue on [GitHub](https://github.com/natedawg92/CatalogImageClean/issues).

Contribution
------------

[](#contribution)

Any contribution is highly appreciated. The best way to contribute code is to open a [pull request on GitHub](https://help.github.com/articles/using-pull-requests).

Developer
---------

[](#developer)

[Nathan Day](mailto:nathanday92@gmail.com)

Licence
-------

[](#licence)

[OSL - Open Software Licence 3.0](http://opensource.org/licenses/osl-3.0.php)

Copyright
---------

[](#copyright)

(c) 2020 Nathan Day

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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

Every ~149 days

Total

3

Last Release

1291d ago

PHP version history (2 changes)1.0.0PHP ~7.3.0||~7.4.0

1.0.2PHP ~7.3.0||~7.4.0||^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/34889378?v=4)[Nathan Day](/maintainers/natedawg92)[@natedawg92](https://github.com/natedawg92)

---

Top Contributors

[![NathanDayMF](https://avatars.githubusercontent.com/u/19840108?v=4)](https://github.com/NathanDayMF "NathanDayMF (7 commits)")[![natedawg92](https://avatars.githubusercontent.com/u/34889378?v=4)](https://github.com/natedawg92 "natedawg92 (6 commits)")[![NathanDayFE](https://avatars.githubusercontent.com/u/68845089?v=4)](https://github.com/NathanDayFE "NathanDayFE (6 commits)")

### Embed Badge

![Health badge](/badges/nathanday-module-catalog-images-clean/health.svg)

```
[![Health](https://phpackages.com/badges/nathanday-module-catalog-images-clean/health.svg)](https://phpackages.com/packages/nathanday-module-catalog-images-clean)
```

###  Alternatives

[baldwin/magento2-module-image-cleanup

Magento 2 module which can cleanup old image files that are no longer being used

8190.4k](/packages/baldwin-magento2-module-image-cleanup)[run_as_root/ext-magento2-google-shopping-feed

This module provides a google shopping product feed csv export.

438.7k](/packages/run-as-root-ext-magento2-google-shopping-feed)[mage-os/module-automatic-translation

Automatic AI content translation for Mage-OS.

277.1k](/packages/mage-os-module-automatic-translation)[graycore/magento2-graphql-introspection-cache

1015.2k](/packages/graycore-magento2-graphql-introspection-cache)[mage-os/module-inventory-reservations-grid

Add a grid with the list of inventory reservations.

126.8k](/packages/mage-os-module-inventory-reservations-grid)

PHPackages © 2026

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