75 $fileUid = (int)$imageAttributes[
'data-htmlarea-file-uid'];
78 $file = Resource\ResourceFactory::getInstance()->getFileObject($fileUid);
79 if ($imageAttributes[
'src'] !== $file->getPublicUrl()) {
81 $imageConfiguration = array(
82 'width' => (
int)$imageAttributes[
'width'],
83 'height' => (
int)$imageAttributes[
'height']
85 $processedFile = $this->getMagicImageService()->createMagicImage($file, $imageConfiguration);
86 $additionalAttributes = array(
87 'src' => $processedFile->getPublicUrl(),
88 'title' => $imageAttributes[
'title'] ?: $file->getProperty(
'title'),
89 'alt' => $imageAttributes[
'alt'] ?: $file->getProperty(
'alternative'),
90 'width' => $processedFile->getProperty(
'width'),
91 'height' => $processedFile->getProperty(
'height'),
93 $imageAttributes = array_merge($imageAttributes, $additionalAttributes);
95 }
catch (Resource\
Exception\FileDoesNotExistException $fileDoesNotExistException) {
97 $message = sprintf(
'I could not find file with uid "%s"', $fileUid);
98 $this->getLogger()->error($message);
111 return $this->cObj->parameters;
119 protected function getMagicImageService() {
126 if (is_array($pageTSConfig) && is_array($pageTSConfig[
'RTE.'][
'default.'])) {
127 $magicImageService->setMagicImageMaximumDimensions($pageTSConfig[
'RTE.'][
'default.']);
130 return $magicImageService;
139 $srcAbsoluteUrl = $this->cObj->parameters[
'src'];
140 return strtolower(substr($srcAbsoluteUrl, 0, 4)) ===
'http' || substr($srcAbsoluteUrl, 0, 2) ===
'//';
146 protected function getLogger() {
151 return $logManager->getLogger(get_class($this));
static implodeAttributes(array $arr, $xhtmlSafe=FALSE, $dontOmitBlankAttribs=FALSE)
renderImageAttributes($content='', $conf)
static makeInstance($className)
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]