{{- $original := .Page.Resources.GetMatch (.Get "src") -}} {{- .Scratch.Set "image" $original -}} {{- $maxWidth := 910 -}} {{- if .Get "width" }} {{- $inputWidth := (int (.Get "width")) -}} {{- $retinaWidth := (mul $inputWidth 2) -}} {{- if gt $original.Width $retinaWidth -}} {{- $finalWidth := (printf "%dx" $retinaWidth ) -}} {{- .Scratch.Set "image" ($original.Resize $finalWidth) -}} {{- end -}} {{- else -}} {{- $inputWidth := $maxWidth -}} {{- if gt $original.Width 1820 -}} {{- .Scratch.Set "image" ($original.Resize "1820x") -}} {{- end -}} {{- end -}} {{- $image := .Scratch.Get "image" -}} {{- if .Get "caption" -}}
{{- else -}}

{{- end -}} {{ .Get {{- if .Get "caption" -}}

{{ .Get "caption" }}
{{- else -}}

{{- end -}}