{{ $source := ($.Page.Resources.ByType "image").GetMatch (printf "*%s*" (.Get "name")) }} {{ $customAlt := .Get "alt" }} {{ $customSize := .Get "size" }} {{ $lazyLoad := default (default true $.Site.Params.GeekdocImageLazyLoading) (.Get "lazy") }} {{ with $source }} {{ $caption := default .Title $customAlt }} {{ $tiny := (.Resize "320x").RelPermalink }} {{ $small := (.Resize "600x").RelPermalink }} {{ $medium := (.Resize "1200x").RelPermalink }} {{ $large := (.Resize "1800x").RelPermalink }} {{ $size := dict "tiny" $tiny "small" $small "medium" $medium "large" $large }}