<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
  xmlns:bk2k="http://typo3.org/ns/BK2K/BootstrapPackage/ViewHelpers" data-namespace-typo3-fluid="true">
<figure class="image">
  <f:if condition="{file.properties.link}">
    <f:then>
      <f:link.typolink parameter="{file.properties.link}" title="{file.properties.title}">
        <f:render partial="Media/Rendering/Image"
          arguments="{file: file, data: data, settings: settings, variants: variants}" />
        <f:if condition="{file.properties.title}">
          <h4><f:format.nl2br>{file.properties.title}</f:format.nl2br></h4>
        </f:if>
      </f:link.typolink>
    </f:then>
    <f:else>
      <f:if condition="{data.image_zoom}">
        <f:then>
          <bk2k:link.lightbox image="{file}" maxHeight="{settings.lightbox.image.maxHeight}"
            maxWidth="{settings.lightbox.image.maxWidth}" class="{settings.lightbox.cssClass}"
            rel="{settings.lightbox.prefix}-{data.uid}" title="{file.properties.title}"
            caption="{file.properties.description}">
            <f:render partial="Media/Rendering/Image"
              arguments="{file: file, data: data, settings: settings, variants: variants}" />
          </bk2k:link.lightbox>
        </f:then>
        <f:else>
          <f:render partial="Media/Rendering/Image"
            arguments="{file: file, data: data, settings: settings, variants: variants}" />
        </f:else>
      </f:if>
    </f:else>
  </f:if>
  <f:if condition="{file.properties.description} && !{data.image_zoom}">
    <figcaption class="caption">
      <f:format.nl2br>{file.properties.description}</f:format.nl2br>
    </figcaption>
  </f:if>
</figure>

</html>
