{{- $old_filename := .Get "src" -}} {{- $img := (.Page.Resources.ByType "image").GetMatch (path.Join "images" $old_filename ) -}} {{- if $img -}} {{- $thumb := $img.Fit "800x800 q90 webp" -}} {{- $new_filename := replace $old_filename (path.Ext $old_filename) "" -}} {{- $dithered := printf "images/dithers/%s_dithered.png" $new_filename -}} {{ $dithered_image := (.Page.Resources.ByType "image").GetMatch $dithered }} {{- $optBlock := dict "display" "block" -}} {{- $alt := .Inner -}}