diff --git a/layouts/_default/_markup/render-image.html b/layouts/_default/_markup/render-image.html index 1acb87d..9c3c9a7 100644 --- a/layouts/_default/_markup/render-image.html +++ b/layouts/_default/_markup/render-image.html @@ -1 +1,9 @@ -{{ .Text }} +{{- $img := .Page.Resources.GetMatch .Destination -}} +{{- if and (not $img) .Page.File -}} + {{ $path := path.Join .Page.File.Dir .Destination }} + {{- $img = resources.Get $path -}} +{{- end -}} + +{{- with $img -}} + {{ $.Text }} +{{- end -}}