{{- if strings.HasPrefix .Destination "http" -}} {{ .Text }} {{- else -}} {{ if .Page.Resources.ByType "image" }} {{ $nr := .Destination }} {{- $pic := index (.Page.Resources.ByType "image") (int $nr) -}} {{- $image := .Page.Resources.GetMatch (printf "%s" ($pic | safeURL)) -}} {{ if ne $image nil }}