{{- $path := .path -}} {{- $caption := .caption -}} {{- $alt := default .caption .alt -}} {{- if $path -}} {{- $isRemote := strings.HasPrefix $path "http" -}} {{- $image := cond $isRemote (resources.GetRemote $path) (resources.Get $path) -}} {{- if $image -}} {{- end -}} {{- end -}}