Typo3 fluid: Use image as background on div container

/ December 15, 2017/ Typo3

(Last Updated On: April 18, 2018) This is something that I have to do almost always when I am working the front end of a new website. It was kind of tricky for me to find.

We need to use the inline version of the f:uri view helper.


<a class="My_Link_As_Image" title="My Title"
    style="background-image: url({f:uri.image(src:file.uid, treatIdAsReference:1, width:'200c')})">

Of course we can use also a complete path as src if needed.

Spread the love

Leave a Reply

Be the First to Comment!


* Checkbox GDPR is required


I agree

Notify of