{% if cfield_data.value is not empty %}
  <div class="castorcito--field-image castorcito--field">
    {% set image_options = {
      alt: cfield_data.alt|t,
      title: cfield_data.title|t,
      loading: cfield_display_settings.image_loading.attribute|default('lazy')
    } %}

    {% if cfield_display_settings.image_style is empty %}
      {% set image_options = image_options|merge({ width: cfield_data.width }) %}
      {% set image_options = image_options|merge({ height: cfield_data.height }) %}
    {% endif %}

    {{ drupal_image(
      cfield_data.value,
      cfield_display_settings.image_style|default(false),
      image_options
    ) }}
  </div>
{% endif %}
