{{ $url := urls.Parse .Destination }} {{ $altText := .Text }} {{ $caption := .Title }} {{ if findRE "^https?" $url.Scheme }}
{{ $altText }} {{ with $caption }}
{{ . | markdownify }}
{{ end }}
{{ else }} {{ with $.Page.Resources.GetMatch ($url.String) }}
{{ $altText }} {{ with $caption }}
{{ . | markdownify }}
{{ end }}
{{ else }} {{ errorf `[CONGO] Markdown image error in "%s": Resource "%s" not found. Check the path is correct or remove the image from the content.` .Page.Path $url.String }} {{ end }} {{ end }}