38 $file = isset($conf[
'file.']) ? $this->cObj->stdWrap($conf[
'file'], $conf[
'file.']) : $conf[
'file'];
40 $file = GeneralUtility::makeInstance(FilePathSanitizer::class)->sanitize($file);
41 if (file_exists($file)) {
42 $fileInfo = GeneralUtility::split_fileref($file);
43 $extension = $fileInfo[
'fileext'];
44 if ($extension ===
'jpg' || $extension ===
'jpeg' || $extension ===
'gif' || $extension ===
'png') {
45 $imageInfo = GeneralUtility::makeInstance(ImageInfo::class, $file);
46 $altParameters = trim($this->cObj->getAltParam($conf,
false));
47 $theValue =
'<img src="'
49 .
'" width="' . (int)$imageInfo->getWidth() .
'" height="' . (int)$imageInfo->getHeight()
50 .
'"' . $this->cObj->getBorderAttr(
' border="0"') .
' ' . $altParameters .
' />';
51 } elseif (filesize($file) < 1024 * 1024) {
52 $theValue = file_get_contents($file);
58 $linkWrap = isset($conf[
'linkWrap.']) ? $this->cObj->stdWrap($conf[
'linkWrap'], $conf[
'linkWrap.']) : $conf[
'linkWrap'];
60 $theValue = $this->cObj->linkWrap($theValue, $linkWrap);
62 $wrap = isset($conf[
'wrap.']) ? $this->cObj->stdWrap($conf[
'wrap'], $conf[
'wrap.']) : $conf[
'wrap'];
64 $theValue = $this->cObj->wrap($theValue, $wrap);
66 if (isset($conf[
'stdWrap.'])) {
67 $theValue = $this->cObj->stdWrap($theValue, $conf[
'stdWrap.']);