Hi,
I'm trying to figure out the IF statement to use for a custom term image. I wish to hide the image if the 'term image' field is not set. Because now it gives a 404 for this empty image.
Can you help me with the correct IF settings for this type of field?
<div class="header-image">
{% set field = attribute( term, 'featured-image' ) %}
<img src="{{ field.full.url }}" width="{{ field.full.width }}" height="{{ field.full.height }}" sizes="(max-width: 2500px) 100vw, 2500px" srcset="{{ field.medium.url }} 600w, {{ field.large.url }} 1675w, {{ field.full.url }} 2000w">
</div>
Thanks in advance,
Roderick