diff --git a/typo3/sysext/frontend/Classes/ContentObject/ImageContentObject.php b/typo3/sysext/frontend/Classes/ContentObject/ImageContentObject.php index 0b9b2c54e17e..d0b7dc40b84d 100644 --- a/typo3/sysext/frontend/Classes/ContentObject/ImageContentObject.php +++ b/typo3/sysext/frontend/Classes/ContentObject/ImageContentObject.php @@ -69,6 +69,7 @@ protected function cImage($file, $conf) $source = $info[3]; } // Remove file objects for AssetCollector, as it only allows to store scalar values + $infoOriginalFile = $info['originalFile']; unset($info['originalFile'], $info['processedFile']); GeneralUtility::makeInstance(AssetCollector::class)->addMedia( $source, @@ -103,7 +104,7 @@ protected function cImage($file, $conf) if ($linkWrap !== '') { $theValue = $this->linkWrap((string)$theValue, $linkWrap); } elseif ($conf['imageLinkWrap'] ?? false) { - $originalFile = !empty($info['originalFile']) ? $info['originalFile'] : $info['origFile']; + $originalFile = !empty($infoOriginalFile) ? $infoOriginalFile : urldecode($info['origFile']); $theValue = $this->cObj->imageLinkWrap($theValue, $originalFile, $conf['imageLinkWrap.']); } $wrap = $this->cObj->stdWrapValue('wrap', $conf ?? []);