All in One Event Calendar – Twig Background Image

Twig reminds me of liquid, but it’s more difficult to understand. It took me a while to find an example of how to do this, so I’m not losing it!

<div class="ai1ec-posterboard-image" style="background-image: url({{
    event.avatar_url | e( 'html_attr' ) }});">
</div>								

Alternatively, is it as an image source link:

<img src="{{ event.avatar_url | e( 'html_attr' ) }}" />

Sourced here.

Leave a Reply

katherine as a flat graphic icon

About Me

I’m an African / Ojibwe First Nations Web Developer living in Winnipeg, Manitoba.

Visit the Tips and Blog to see what I’m working on.