fixed the issue. Will look into that further Instead of using a content element on a hidden page you can use the "Resources" tab of a page, where you can upload files (in your case images). Usually you use the page on the top level of your TYPO3 pagetree for this, so you can inherit selected images to all subpages.
will help you Maybe I don't understood correctly, but... you don't need to write it yourself, just in your main TS template include CSS Styled Content from extension, so you can render whole column like:
may help you . In the install tool there is a value that can change the recognized image file extensions: Add ,svgto the input field for [GFX][imagefile_ext]under "All configuration" -> "$TYPO3_CONF_VARS['GFX']"
TYPO3 first available image of content elements
By : Eric Sun
Date : March 29 2020, 07:55 AM
wish of those help I used this to get the url of the first image on a page for open graph tags.