Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $contentObjectRenderer = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class);
- $filesContent = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Frontend\ContentObject\FilesContentObject::class, $contentObjectRenderer);
- $filesConfiguration = [
- 'references' => $image_reference_uid, // this is a UID from sys_file_reference
- 'renderObj' => 'IMAGE',
- 'renderObj.' => [
- 'file.' => [
- 'import.' => [
- 'data' => 'file:current:uid',
- ],
- 'treatIdAsReference' => '1',
- 'width' => '1360c',
- 'height' => '567c',
- ]
- ]
- ];
- $image_html = $filesContent->render($filesConfiguration);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement