{% sw_extends '@Storefront/storefront/element/cms-element-image.html.twig' %}
{% block element_image_media %}
<!-- THEME -->
{% if 'inline-style' in blockClasses.0 %}
{% set customFields = page.footer.navigation.active.translated.customFields.wn_cc_headerimage_style %}
{% set attributes = {
'class': 'cms-image',
'alt': (element.data.media.translated.alt ?: ''),
'title': (element.data.media.translated.title ?: ''),
'style': (customFields)
} %}
{% if element.translated.config.displayMode.value == 'cover' or element.translated.config.displayMode.value == 'contain' %}
{% set attributes = attributes|merge({ 'data-object-fit': element.translated.config.displayMode.value }) %}
{% endif %}
{% sw_thumbnails 'cms-image-thumbnails' with {
media: element.data.media
} %}
{% else %}
{{ parent() }}
{% endif %}
{% endblock %}