Feature: #88602 - Allow registering additional file processors
See forge#88602
Description
Registering additional file processors has been introduced.
New processors need to implement the interface
\TYPO3\
.
To register a new processor, add the following code to ext_
$GLOBALS['TYPO3_CONF_VARS']['SYS']['fal']['processors']['MyNewImageProcessor'] = [
'className' => \Vendor\ExtensionName\Resource\Processing\MyNewImageProcessor::class,
'before' => ['LocalImageProcessor']
];
Copied!
To order the processors, use before
and after
statements. TYPO3 will process the file
with the first processor that is able to process a given task.
Impact
Developers are now able to provide their own file processing. By providing priorities, the processor ending up handling the file can be determined on a fine granular level including a fallback.
Examples for custom implementations might be:
- add a watermark to each image of type png
- compress uploaded pdf files into zip archives
- store images that should be cropped at a separate position in the target storage