PHPackages                             derhansen/processed-images-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. derhansen/processed-images-cleaner

ActiveTypo3-cms-extension

derhansen/processed-images-cleaner
==================================

Symfony console command to clean up processed images by several conditions

1.1.0(1mo ago)512[1 issues](https://github.com/derhansen/processed_images_cleaner/issues)GPL-2.0-or-laterPHPCI passing

Since Jul 12Pushed 1w agoCompare

[ Source](https://github.com/derhansen/processed_images_cleaner)[ Packagist](https://packagist.org/packages/derhansen/processed-images-cleaner)[ Docs](https://github.com/derhansen/processed_images_cleaner)[ RSS](/packages/derhansen-processed-images-cleaner/feed)WikiDiscussions main Synced 1w ago

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

[![Latest Stable Version](https://camo.githubusercontent.com/5f0c88af6918f036bd6390316c09367c1baf8ac862b643040ee21f7f1f875bfb/68747470733a2f2f706f7365722e707567782e6f72672f64657268616e73656e2f70726f6365737365642d696d616765732d636c65616e65722f762f737461626c65)](https://packagist.org/packages/derhansen/processed-images-cleaner)[![TYPO3 13](https://camo.githubusercontent.com/2cf6570821614808899422f68a66a381a2de1dd0746ba9cdba6155def1f4f396/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5459504f332d31332d6f72616e67652e737667)](https://get.typo3.org/version/13)[![TYPO3 14](https://camo.githubusercontent.com/382ff45949671f1b9c4431781f1961eb04a15376fe22523e03a9893c6d4ec278/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5459504f332d31342d6f72616e67652e737667)](https://get.typo3.org/version/14)[![Monthly Downloads](https://camo.githubusercontent.com/eb5a098261609a2893667dbb92089721c26b81771a622ca3296eb93f0665f6db/68747470733a2f2f706f7365722e707567782e6f72672f64657268616e73656e2f70726f6365737365642d696d616765732d636c65616e65722f642f6d6f6e74686c79)](https://packagist.org/packages/derhansen/processed-images-cleaner)[![License](https://camo.githubusercontent.com/21e72f4eef0ee685cf1f8841f223f5dff266a11a0af1f1ff6b7dc0bd80abcf42/68747470733a2f2f706f7365722e707567782e6f72672f64657268616e73656e2f70726f6365737365642d696d616765732d636c65616e65722f6c6963656e7365)](https://packagist.org/packages/derhansen/processed-images-cleaner)[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://camo.githubusercontent.com/39c688bf243eeb6d3bfc529dcf3cb27443613deb696c8fa9f49bccf1e63e3bef/68747470733a2f2f7777772e7265706f7374617475732e6f72672f6261646765732f6c61746573742f6163746976652e737667)](https://www.repostatus.org/#active)

Processed Images Cleaner
========================

[](#processed-images-cleaner)

What is it?
-----------

[](#what-is-it)

Processed Images Cleaner is an extension for TYPO3 CMS that provides a Symfony console command to clean up **processed image files** (records in `sys_file_processedfile` and their physical files) by several conditions.

TYPO3 creates a processed file every time an image is rendered in a specific size, crop or format. Over time – and especially after changing image cropping, breakpoints or processing instructions – the `_processed_` folder accumulates a large number of stale files that are no longer referenced. Deleting a processed file is safe: TYPO3 transparently regenerates it the next time it is requested. This extension lets you remove those files in a targeted way.

**Summary of features**

- Clean up processed images by original file storage, folder, file UID or file identifier
- Filter by the processing configuration itself (e.g. `width`, `maxWidth`, `cropVariant`)
- Lenient numeric matching, so `width=800` also matches the TypoScript modifiers `800m` / `800c`
- Match unset configuration values with `key=null`
- `--dry-run` mode to preview what would be deleted without touching any file
- Only ever touches processed files whose **original is an image**
- Never touches the "uses original file" placeholder rows (empty identifier)
- Refuses to run without at least one filter, to prevent accidental mass deletion
- Combinable filters – all provided filters must match (logical AND)

**Background**

- Based on a single, dependency-free Symfony console command
- Covered with functional tests
- Actively maintained

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

[](#requirements)

VersionTYPO3PHP1.013.4 &amp; 14.38.2 - 8.5Installation
------------

[](#installation)

### Installation using Composer

[](#installation-using-composer)

The recommended way to install the extension is by using [Composer](https://getcomposer.org/). In your Composer based TYPO3 project root, just do `composer require derhansen/processed-images-cleaner`.

### Installation as extension from TYPO3 Extension Repository (TER)

[](#installation-as-extension-from-typo3-extension-repository-ter)

Download and install the extension with the TYPO3 extension manager module.

Usage
-----

[](#usage)

The extension registers the console command `cleanup:processedimages`. In a Composer based installation it is run via the TYPO3 binary:

```
./vendor/bin/typo3 cleanup:processedimages [options]
```

In a classic (non-Composer) installation use:

```
./typo3/sysext/core/bin/typo3 cleanup:processedimages [options]
```

> **The command refuses to run without at least one filter.** You must provide at least one file filter (`--storage`, `--folder`, `--file-uid`, `--identifier`) or a configuration filter (`--config`). This is a safety measure to avoid deleting *all* processed files by accident.

### Options

[](#options)

OptionShortcutRepeatableDescription`--dry-run`noDo not delete anything, only report what would be deleted.`--storage``-s`noStorage UID of the original files.`--folder``-f`noFolder identifier within the storage, e.g. `user_upload/`.`--file-uid``-u`yesUID of an original `sys_file` record.`--identifier``-i`yesFull original file identifier incl. path, e.g. `/user_upload/foo/bar/image.jpg`.`--config``-c`yesProcessing configuration filter as `key=value`, e.g. `-c width=1000 -c cropVariant=default`.`--limit``-l`noMaximum number of processed files to delete (positive integer). Files are processed ordered by uid.**File filters** (`--storage`, `--folder`, `--file-uid`, `--identifier`) narrow the database query based on the *original* file. **Configuration filters** (`--config`) are evaluated per processed file against its stored processing configuration. When several filters are given, **all of them must match**.

### Examples

[](#examples)

**Preview (dry-run) all processed files below a folder – nothing is deleted:**

```
./vendor/bin/typo3 cleanup:processedimages --folder="user_upload/" --dry-run
```

**Delete all processed images of a specific file storage:**

```
./vendor/bin/typo3 cleanup:processedimages --storage=1
```

**Delete processed images for one or more original files (by UID):**

```
./vendor/bin/typo3 cleanup:processedimages --file-uid=42 --file-uid=43
# or using the shortcut
./vendor/bin/typo3 cleanup:processedimages -u 42 -u 43
```

**Delete processed images for a specific original file (by identifier):**

```
./vendor/bin/typo3 cleanup:processedimages --identifier="/user_upload/campaigns/hero.jpg"
```

**Delete processed images by processing configuration (width):**

```
./vendor/bin/typo3 cleanup:processedimages --config=width=1000
```

Numeric values match leniently, so `width=800` also matches processed files stored with the TypoScript modifiers `800m` (max) or `800c` (crop-scale).

**Delete processed images of a specific crop variant:**

```
./vendor/bin/typo3 cleanup:processedimages -c cropVariant=default
```

**Match records where a configuration value is unset (`null`):**

```
./vendor/bin/typo3 cleanup:processedimages -c height=null
```

**Combine several configuration filters (all must match):**

```
./vendor/bin/typo3 cleanup:processedimages -c width=1000 -c maxWidth=1800 -c cropVariant=default
```

**Combine file and configuration filters, preview first:**

```
./vendor/bin/typo3 cleanup:processedimages -f "user_upload/campaigns/" -c cropVariant=square --dry-run
```

**Limit how many files are deleted per run:**

```
./vendor/bin/typo3 cleanup:processedimages --storage=1 --limit=500
```

All matching files are still counted and reported as *selected*, but only the first `--limit`files (ordered by uid) are actually deleted. This is useful to spread a large cleanup over several runs. The final summary shows both figures, e.g. `1234 processed file(s) selected, 500 deleted, 42.0 M freed.`

A typical, safe workflow is to first run the command with `--dry-run` to review the matched files and the amount of disk space that would be freed, and then run the same command again without `--dry-run` to actually delete the files.

Scheduling in the TYPO3 backend
-------------------------------

[](#scheduling-in-the-typo3-backend)

The command can be scheduled as a recurring task via the TYPO3 Scheduler (*"Execute console commands"* task, task type `cleanup:processedimages`). All options are available in the task configuration form.

Repeatable options (`--file-uid`, `--identifier`, `--config`) work in the backend as well – they are just entered differently than on the command line. Since the Scheduler cannot render a repeatable input field, TYPO3 core maps array options to a **single comma-separated value field**. Enable the option's checkbox and enter the multiple values separated by commas:

OptionOn the CLIIn the Scheduler task field`--file-uid``-u 42 -u 43``42,43``--identifier``-i /a/one.jpg -i /a/two.jpg``/a/one.jpg,/a/two.jpg``--config``-c width=1000 -c cropVariant=default``width=1000,cropVariant=default`Please note:

- A configuration value must not itself contain a comma – the comma is the fixed separator, and there is no way to escape it.
- Do not leave a trailing comma (e.g. `width=1000,`). It produces an empty item that the command rejects with an *"Invalid --config value"* error.

This is standard TYPO3 core behaviour and not a limitation of this extension.

How it works
------------

[](#how-it-works)

- Only processed files whose **original file is an image** are considered.
- Rows that only cache the "no processing needed / uses original file" decision (empty identifier) are never touched – there is no physical file to remove.
- The processing configuration is read from the `configuration` column of `sys_file_processedfile` and matched against the given `--config` filters. Numeric values are compared leniently (ignoring the `m`/`c` TypoScript modifiers), and `key=null` also matches configuration shapes that omit the key entirely.
- Deleted processed files are removed both as database record and as physical file. TYPO3 regenerates them on demand the next time the image is rendered.

Contributing
------------

[](#contributing)

Pull requests are welcome. Please open an issue first to discuss larger changes.

Reporting a Vulnerability
-------------------------

[](#reporting-a-vulnerability)

Please report vulnerabilities to  only.

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance90

Actively maintained with recent releases

Popularity12

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity35

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

Every ~0 days

Total

2

Last Release

49d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d52103f3af5442e3cf7f3fb14456dc51f311af529394f0325bcd0a4e8d407947?d=identicon)[derhansen](/maintainers/derhansen)

---

Top Contributors

[![derhansen](https://avatars.githubusercontent.com/u/2629896?v=4)](https://github.com/derhansen "derhansen (24 commits)")

---

Tags

typo3-cms-extensionimagesTYPO3 CMScleanupprocessed

### Embed Badge

![Health badge](/badges/derhansen-processed-images-cleaner/health.svg)

```
[![Health](https://phpackages.com/badges/derhansen-processed-images-cleaner/health.svg)](https://phpackages.com/packages/derhansen-processed-images-cleaner)
```

###  Alternatives

[friendsoftypo3/content-blocks

TYPO3 CMS Content Blocks - Content Types API | Define reusable components via YAML

103629.7k74](/packages/friendsoftypo3-content-blocks)[derhansen/sf_event_mgt

Event management and registration - Configurable event management and registration extension based on ExtBase and Fluid

68355.1k11](/packages/derhansen-sf-event-mgt)[web-vision/deepltranslate-core

DeepL Translate (CORE) - This extension provides option to translate content element, and TCA record texts to DeepL supported languages.

34176.7k12](/packages/web-vision-deepltranslate-core)[wazum/sluggi

TYPO3 extension for URL slug management with inline editing, auto-sync, locking, access control, and redirects

40556.7k](/packages/wazum-sluggi)[yoast-seo-for-typo3/yoast_seo

Yoast SEO for TYPO3

511.8M9](/packages/yoast-seo-for-typo3-yoast-seo)[web-vision/wv_deepltranslate

DeepL Translate (CORE) - This extension provides option to translate content element, and TCA record texts to DeepL supported languages.

34311.2k](/packages/web-vision-wv-deepltranslate)

PHPackages © 2026

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