Skip to content

Commit

Permalink
feat: add fileExt in process instruction (TYPO3-Headless#475)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kubilay Melnikov committed Sep 8, 2022
1 parent 0cb1e1d commit c0aabbb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Classes/Utility/FileUtility.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,9 @@ public function processImageFile(FileInterface $image, array $dimensions = [], s
'maxHeight' => $dimensions['maxHeight'] ?? $properties['maxHeight'] ?? 0,
'crop' => $cropArea->isEmpty() ? null : $cropArea->makeAbsoluteBasedOnFile($image),
];
if (!empty($dimensions['fileExtension'])) {
$processingInstructions['fileExtension'] = $dimensions['fileExtension'];
}
return $this->imageService->applyProcessingInstructions($image, $processingInstructions);
} catch (\UnexpectedValueException|\RuntimeException|\InvalidArgumentException $e) {
$type = lcfirst(get_class($image));
Expand Down

0 comments on commit c0aabbb

Please sign in to comment.