{{ $alt := .Get 1 | default "" }} {{ $class := .Get 2 | default "" }} {{ $imgpath := "images/" }} {{- with $mainPath := .Get 0 }} {{- with $i := resources.Get (printf "%s%s" $imgpath $mainPath) }} {{ $resizedImage := $i.Process "resize 1920x" }} {{ $smallpath := "images/small/" }} {{- with $smallImage := resources.Get (printf "%s%s" $smallpath $mainPath ) }} {{ $smallResized := $smallImage.Process "resize 1080x" }} {{- end}} {{ $alt }} {{- else }} {{- errorf "The %q shortcode was unable to find %q. See %s" $.Name . $.Position }} {{- end }} {{- else }} {{- errorf "The %q shortcode requires a positional parameter (0) indicating the image path, relative to the current page. See %s" $.Name $.Position }} {{- end }}