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