{{- $Page := .Page -}} {{ $gallery := site.GetPage .Path }} {{ with $gallery.Resources.ByType "image" }} {{ $index := len . }} {{ $Page.Scratch.Add "img" slice }} {{ range . }} {{ $index = sub $index 1 }} {{ $lores := .Resize "1000x webp Lanczos q70" }} {{ $hires := .Resize "2500x webp Lanczos q75" }} {{ $Page.Scratch.Add "img" (dict "index" (int $index) "loUrl" (string $lores.RelPermalink) "loImgH" (int $lores.Height) "loImgW" (int $lores.Width) "hiUrl" (string $hires.RelPermalink) "hiImgH" (int $hires.Height) "hiImgW" (int $hires.Width) ) }} {{- end -}} {{- end -}}