{{- $gridSize := $.Site.Params.photos.thumbnailSize -}}
{{- $thumbnail := partial "photos/thumbnail.html" (dict "Page" . "Width" $gridSize "Height" $gridSize) -}}
{{- $thumbnail = $thumbnail.Crop (printf "%dx%d" $gridSize $gridSize) -}}
{{- $altText := $thumbnail.Params.alt -}}
<a href="{{ .RelPermalink }}" title="{{ .Title }}">
  <img
    src="{{ $thumbnail.RelPermalink }}"
    {{ with $altText }}
      alt="{{ . }}"
    {{ end }}
    width={{ $gridSize }}
    height={{ $gridSize }}>
</a>
