{{ $sa := . }}
- {{ with .Params.teaserImage }}
- {{ $img := $sa.Resources.Get . }}
-
+ {{ with .Resources.Get "thumbnail.jpg" }}
+
{{ else }}
{{ warnf "Could not find teaser image for %s" .RelPermalink }}
diff --git a/layouts/partials/albums/images.json b/layouts/partials/albums/images.json
index b8da7da..b3c55b5 100644
--- a/layouts/partials/albums/images.json
+++ b/layouts/partials/albums/images.json
@@ -1,9 +1,6 @@
{{- $first := true -}}
{{- $filter := images.AutoOrient -}}
-{{- $teaser := "" -}}
-{{- with .Params.teaserImage -}}
- {{- $teaser = $.Resources.GetMatch . -}}
-{{- end -}}
+{{- $teaser := .Resources.GetMatch "thumbnail.jpg" -}}
{{- range .Resources.ByType "image" -}}
{{- if not (eq $teaser .) -}}
{{- if not $first }}, {{ end }}