Skip to content

Commit

Permalink
[BUGFIX] Fix cropping with TYPO3 >= 8.7.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Devid Messner authored and alexanderschnitzler committed Sep 18, 2017
1 parent 6a6da6f commit 2d6b793
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Classes/Resource/Rendering/ImageRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,9 @@ public function render(
try {
$cropVariantCollection = CropVariantCollection::create((string)$file->getProperty('crop'));
$defaultCropArea = $cropVariantCollection->getCropArea();
$defaultProcessConfiguration['crop'] = !$defaultCropArea->isEmpty() ? $defaultCropArea : null;
$defaultProcessConfiguration['crop'] = !$defaultCropArea->isEmpty()
? $defaultCropArea->makeAbsoluteBasedOnFile($file)
: null;
} catch (\Exception $e) {
$defaultProcessConfiguration['crop'] = null;
}
Expand Down

0 comments on commit 2d6b793

Please sign in to comment.