Typo3 fluid: Use image as background on div container

/ December 15, 2017/ Typo3

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:uriview helper.

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

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

 

.

Spread the love

Leave a Reply

Be the First to Comment!

Notify of
avatar