{% load wagtailimages_tags wagtail_dsfr_tags %}

{% image value.image original as artwork %}
{% settings_value "SF_SCHEME_DEPENDENT_SVGS" as scheme_dependent_svgs %}

{% if scheme_dependent_svgs and artwork.file.name|slice:"-4:" == ".svg" %}
  <div class="fr-responsive-img">
    <svg aria-hidden="true" class="fr-artwork" viewBox="0 0 80 80">
      <use class="fr-artwork-decorative" href="{{ artwork.full_url }}#artwork-decorative"></use>
      <use class="fr-artwork-minor" href="{{ artwork.full_url }}#artwork-minor"></use>
      <use class="fr-artwork-major" href="{{ artwork.full_url }}#artwork-major"></use>
    </svg>
  </div>
{% else %}
  {% if alt %}
    {% image value.image original class=extra_classes alt=alt %}
  {% else %}
    {% image value.image original class=extra_classes %}
  {% endif %}
{% endif %}
