<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" xmlns:ce="http://typo3.org/ns/TYPO3/CMS/FluidStyledContent/ViewHelpers" data-namespace-typo3-fluid="true">

<figure class="image">
    <f:if condition="{file.link}">
        <f:then>
            <f:link.typolink parameter="{file.link}" title="{file.title}">
                <f:render section="imagetype" arguments="{_all}"/>
            </f:link.typolink>
        </f:then>
        <f:else>
            <f:if condition="{data.image_zoom}">
                <f:then>
                    <ce:link.clickEnlarge image="{file}" configuration="{settings.media.popup}">
                        <f:render section="imagetype" arguments="{_all}"/>
                    </ce:link.clickEnlarge>
                </f:then>
                <f:else>
                    <f:render section="imagetype" arguments="{_all}"/>
                </f:else>
            </f:if>
        </f:else>
    </f:if>
    <f:if condition="{file.description}">
        <figcaption class="image-caption">
            <f:format.raw>{file.description -> f:format.nl2br()}</f:format.raw>
        </figcaption>
    </f:if>
</figure>

<f:section name="imagetype">
    <f:comment>
        <f:if condition="{file.originalFile.properties.mime_type} !== 'image/svg+xml'">
            <f:then>
                <f:render partial="Media/Rendering/Image" arguments="{file: file, dimensions: dimensions, data: data, settings: settings}"/>
            </f:then>
            <f:else>
                <f:render partial="Media/Rendering/Svg" arguments="{file: file, dimensions: dimensions, data: data, settings: settings}"/>
            </f:else>
        </f:if>
    </f:comment>

    <f:render partial="Media/Rendering/Image" arguments="{file: file, dimensions: dimensions, data: data, settings: settings}"/>
</f:section>

