---
title: "Custom file processors"
manual: "TYPO3 Explained"
version: "main"
permalink: "https://docs.typo3.org/permalink/t3coreapi:file-processing@main"
source: "ApiOverview/FileProcessing/Index.rst"
rendered: "2026-09-17T14:31:42+00:00"
---

# Custom file processors {#custom-file-processors}

For custom needs in terms of file processing, registration of custom file processors is available.

## Create a new processor class {#create-a-new-processor-class}

The file must implement the `\TYPO3\CMS\Core\Resource\Processing\ProcessorInterface` and two required methods.

-   **`canProcessTask()`**

    Will decide whether the given file should be handled at all. The expected return type is boolean.

-   **`processTask()`**

    Will then do whatever needs to be done to process the given file.

## Register the file processor {#register-the-file-processor}

To register a new processor, add the following code to [`ext_localconf.php`](../../ExtensionArchitecture/FileStructure/ExtLocalconf.md#file-extension-ext-localconf-php)

**EXT:my_extension/ext_localconf.php**

```php
<?php

$GLOBALS['TYPO3_CONF_VARS']['SYS']['fal']['processors']['MyNewImageProcessor'] = [
  'className' => \MyVendor\ExtensionName\Resource\Processing\MyNewImageProcessor::class,
  'before' => ['LocalImageProcessor'],
];

```

With the `before` and `after` options, priority can be defined.

> [!NOTE]
> Only one file processor will handle any given file. Once the first match for `canProcessTask()` has been found, this is the
> processor that will handle the file. There is no cascading or sequence possible, so make sure your processor does all the work
> necessary.
