{{ $alt := .Get "alt" }} {{ $content := .Inner | replaceRE "^\n" "" | replaceRE "\n$" "" | markdownify }} {{ $format := .Get "format" }} {{ $header := .Get "header" | markdownify }} {{ $height := .Get "height" }} {{ $image := .Get "image" }} {{ $imageclass := .Get "imageclass" }} {{ $maxheight := .Get "maxheight" | default "20rem" }} {{ $maxwidth := .Get "maxwidth" }} {{ $page := .Page }} {{ $stretch := .Get "stretch" }} {{ $title := .Get "title" }} {{ $width := .Get "width" }}
{{ with $image }} {{ $classes := split $imageclass " "}} {{ if $stretch }} {{ $classes = $classes | append "object-fit-cover w-100" }} {{ else }} {{ $classes = $classes | append "mw-100" }} {{ end }} {{ $imageclass = delimit $classes " " }}

{{ partial "paige/img.html" (dict "alt" $alt "class" $imageclass "fetchpriority" "high" "format" $format "height" $height "loading" "eager" "maxheight" $maxheight "maxwidth" $maxwidth "page" $page "src" . "title" $title "width" $width ) }}

{{ end }} {{ with $header }}

{{ . }}

{{ end }} {{ with $content }}

{{ . }}

{{ end }}