Skip to content

[BUGFIX] Return file extension for processed files - #901

Open
tim-baecker wants to merge 4 commits into
TYPO3-Headless:4.xfrom
tim-baecker:bugfix/processed-file-extension
Open

[BUGFIX] Return file extension for processed files#901
tim-baecker wants to merge 4 commits into
TYPO3-Headless:4.xfrom
tim-baecker:bugfix/processed-file-extension

Conversation

@tim-baecker

@tim-baecker tim-baecker commented Jul 22, 2026

Copy link
Copy Markdown

Summary

  • After image processing, FileUtility reads extension via getProperty('extension') on a ProcessedFile.
  • Processed files do not store an extension property, so JSON always contains "extension": null whenever processing actually runs (maxWidth, crop, etc.).
  • Use getExtension() instead (already used elsewhere in FileUtility for imagefile_ext checks), which derives the extension from the filename of the served file.

Example

With processingConfiguration.maxWidth = 1200 on ogImage, properties previously looked like:

"extension": null

and now correctly return:

"extension": "jpg"

Test plan

  • Process an image via FilesProcessor with maxWidth / crop enabled
  • Confirm properties.extension matches the processed file (e.g. jpg, or webp when fileExtension = webp)
  • Confirm unprocessed / unchanged files still return a correct extension

Tim Bäcker and others added 2 commits July 22, 2026 12:46
ProcessedFile::getProperty('extension') always returns null because
processed-file records do not store an extension property. Use
getExtension() instead so image metadata (e.g. ogImage) exposes the
correct extension after processing.
@twoldanski

Copy link
Copy Markdown
Collaborator

@tim-baecker thx for the patch! Could fix the tests as well?

Tim Bäcker and others added 2 commits July 31, 2026 14:02
Mock ProcessedFile::getExtension() and adjust the video baseline so
unit tests match the FileUtility change that no longer reads extension
via getProperty().
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants