{{- $src := .Get "src" -}}
{{- $source := resources.Get $src -}}
{{- $alt := .Get "alt" -}}
{{- $caption := .Get "caption" -}}
{{- $location := .Get "location" -}}
{{- $fullsize := $source -}}
{{- $thumb := $source.Resize "400x webp" -}}
<figure class="photo-card"
  data-photo-index="{{ .Ordinal }}"
  data-src="{{ $fullsize.RelPermalink }}"
  data-alt="{{ $alt }}"
  data-caption="{{ $caption }}"
  data-location="{{ $location }}">
  <img src="{{ $thumb.RelPermalink }}" alt="{{ $alt }}" loading="lazy">
  {{ with $caption }}<figcaption>{{ . }}</figcaption>{{ end }}
</figure>
