{{ $caption := .Title }} {{ $alt := .Text }} {{ $img := .Page.Resources.GetMatch .Destination }} {{ if not $img }} {{ $img = resources.Get .Destination }} {{ if not $img }} {{ $img := resources.GetRemote .Destination | resources.Copy (path.Join "images" (path.Base .Destination)) }} {{ end }} {{ end }} {{ with $img }} {{ partial "components/image.html" (dict "url" .RelPermalink "alt" $alt "width" .Width "height" .Height) }}
{{ end }}