{{- $url := urls.Parse .Destination -}}
{{- if $url.Scheme -}}
{{/* third party image */}}
{{- else -}}
{{/* internal image */}}
{{- $img := .Page.Resources.GetMatch .Destination -}}
{{- if not $img -}}
{{- $img = resources.Get .Destination -}}
{{- end -}}
{{- if $img -}}
{{- if eq $img.MediaType.MainType "video" -}}
{{- else -}}
{{- end -}}
{{- else -}}
{{- warnf "No image found for %s from %s" .Destination .Page.File }}
{{- end -}}
{{- end -}}