{{/* Remote image */ -}} {{ if or (hasPrefix .Destination "https://") (hasPrefix .Destination "http://") }} {{.Text}} {{/* Local image */ -}} {{ else }} {{- $img := .Page.Resources.GetMatch .Destination -}} {{- $resizeMimes := slice "image/png" "image/jpeg" -}} {{ if $img -}} {{ if in $resizeMimes $img.MediaType.Type -}} {{.Text}} {{- else -}} {{.Text}} {{- end -}} {{- else -}} {{.Text}} {{- end -}} {{- end -}} {{ if .Title }}
{{ .Title }}
{{ end }}