{{- $first := true -}} {{- $filter := images.AutoOrient -}} {{- $teaser := "" -}} {{- with .Params.teaserImage -}} {{- $teaser = $.Resources.GetMatch . -}} {{- end -}} {{- range .Resources.ByType "image" -}} {{- if not (eq $teaser .) -}} {{- if not $first }}, {{ end }} {{ $first = false -}} {{- with . | images.Filter $filter -}} { "title": "{{ .Title }}", "url": "{{ .RelPermalink }}", "width": "{{ .Width }}", "height": "{{ .Height }}", "thumbnail": "{{ (.Fit "300x200").RelPermalink }}" } {{- end -}} {{- end -}} {{ end -}}