2 namespace TYPO3\CMS\Fluid\ViewHelpers;
67 parent::initializeArguments();
81 public function render($file, $additionalConfig = array(), $width = null, $height = null)
85 if (is_callable(array($file,
'getOriginalResource'))) {
87 $file = $file->getOriginalResource();
93 if ($fileRenderer === null) {
96 $additionalConfig = array_merge_recursive($this->arguments, $additionalConfig);
97 return $fileRenderer->render($file, $width, $height, $additionalConfig);
112 $processingInstructions = array(
118 $processedImage = $imageService->applyProcessingInstructions($image, $processingInstructions);
119 $imageUri = $imageService->getImageUri($processedImage);
121 $this->tag->addAttribute(
'src', $imageUri);
122 $this->tag->addAttribute(
'width', $processedImage->getProperty(
'width'));
123 $this->tag->addAttribute(
'height', $processedImage->getProperty(
'height'));
129 if (empty($this->arguments[
'alt'])) {
130 $this->tag->addAttribute(
'alt', $alt);
132 if (empty($this->arguments[
'title']) && $title) {
133 $this->tag->addAttribute(
'title', $title);
136 return $this->tag->render();
146 return $this->objectManager->get(ImageService::class);