{% set mediaObject = image.image is not null ? image.image : null %}{% set imageUrl = image.isInternal == false and mediaObject is not null ? image.external_image : (mediaObject is not null ? sulu_get_media_url(mediaObject, 'inline') : image.external_image) %}{% set alt = image.alt|default('') %}{% set width = image.width|default(null) %}{% set widthUnit = image.widthUnit|default('%') %}{% set height = image.height|default(null) %}{% set heightUnit = image.heightUnit|default('%') %}{% set objectFit = image.objectFit|default('fill') %}{% set bordersRadius = image.bordersRadius|default(null) %}{% set bordersRadiusUnit = image.bordersRadiusUnit|default('px') %}{% set borderImageCheckbox = image.borderImageCheckbox|default(false) %}{% set boxShadowImageCheckbox = image.boxShadowImageCheckbox|default(false) %}{% set borderSizeImage = image.borderSizeImage|default(null) %}{% set borderSizeImageUnit = image.borderSizeImageUnit|default('px') %}{% set boxShadowPosXImage = image.boxShadowPosXImage|default(null) %}{% set boxShadowPosYImage = image.boxShadowPosYImage|default(null) %}{% set boxShadowSpreadImage = image.boxShadowSpreadImage|default(null) %}{% set boxShadowUnitImage = image.boxShadowUnitImage|default('px') %}{% set legend = image.legend|default('') %}{% set legendPosition = image.legendPosition|default('center') %}{% set clipPath = image.clipPath|default(null) %}{% set hasBorder = not borderImageCheckbox and borderSizeImage is not null %}{% set hasShadow = boxShadowImageCheckbox and (boxShadowPosXImage is not null or boxShadowPosYImage is not null or boxShadowSpreadImage is not null) %}{% set borderColor = image.borderColor %}<figure style="{% if width is not null %} width:{{ width }}{{ widthUnit }};{% endif %}{% if height is not null %} height:{{ height }}{{ heightUnit }}{% endif %}position: relative;"><imgclass="img-fluid w-100"src="{{ imageUrl }}"alt="{{ alt }}"style="object-fit: {{ objectFit }};{% if bordersRadius is not null %}border-radius: {{ bordersRadius }}{{ bordersRadiusUnit }};{% endif %}{% if hasBorder %}border: {{ borderSizeImage }}{{ borderSizeImageUnit }} solid {{ borderColor}};{% endif %}{% if hasShadow %}box-shadow:{% if boxShadowPosXImage is not null %}{{ boxShadowPosXImage }}{{ boxShadowUnitImage }}{% else %}0px{% endif %}{% if boxShadowPosYImage is not null %}{{ boxShadowPosYImage }}{{ boxShadowUnitImage }}{% else %}0px{% endif %}{% if boxShadowSpreadImage is not null %}{{ boxShadowSpreadImage }}{{ boxShadowUnitImage }}{% else %}0px{% endif %}{% if borderColor is not null %} {{ borderColor }}{% else %} rgba(0,0,0,.5){% endif %};{% endif %}{% if clipPath and clipPath is not empty %}{{ clipPath }};{% endif %}"/>{% if legend %}<figcaption class="figure-caption text-{{ legendPosition }} mt-2">{{ legend }}</figcaption>{% endif %}</figure>