I am trying to loop through the pagelist and display the teaser image as background image. Below is my code. The problem with this is I have to define a width and in my case, I want to use the original width or height. How can I accomplish this?
<li>
<@ with @{ imageTeaser | def('*.jpg, *.jpeg, *.png, *.gif') } {
width: 840
} @>
<a
href="@{ url }"
class="buzz-category-card"
style="background-image: url('@{ :fileResized }')"
>
<span class="">
@{ title }
</span>
<span class="">
@{ teaser }
</span>
<span class="">
<@ ../../snippets/date.php @>
</span>
</a>
<@ end @>
</li>