{{$src := .Destination | safeURL }}
{{$width := index (split .Text "|") 1 | default "auto" }}
{{$external := strings.HasPrefix $src "http" }}
{{- if $external -}}
{{- else -}}
{{$fixedUrl := (cond (hasPrefix $src "/") $src (printf "%s%s" .Page.File.Dir $src)) | urlize}}
{{- end -}}