In a node teaser or full view mode it is for front-end purposes needed to know if an image is available. This snippet takes care of it.

{% if not node.field_image.isempty %}
  <div class="logo-region">
    {{ content.field_image }}
  </div>
{% endif %}

 


Saved you some valuable time?

Donate and get more free time-saving code on this website in the future.