diff --git a/layouts/partials/function/getRemoteImage.html b/layouts/partials/function/getRemoteImage.html index b58b6d572..833713a2e 100644 --- a/layouts/partials/function/getRemoteImage.html +++ b/layouts/partials/function/getRemoteImage.html @@ -7,12 +7,12 @@ {{- end -}} {{- if (eq $suffixList false) | or $valid -}} - {{- with try $remoteResource := resources.GetRemote . -}} + {{- with try resources.GetRemote . -}} {{- with .Err -}} {{- warnf "%s" . -}} {{ else }} - {{- if eq $remoteResource.ResourceType "image" -}} - {{- $resource = $remoteResource -}} + {{- if eq .Value.ResourceType "image" -}} + {{- $resource = .Value -}} {{- end -}} {{- end -}} {{- end -}} diff --git a/layouts/partials/plugin/image.html b/layouts/partials/plugin/image.html index 6c7f8e2ec..02769b1d8 100644 --- a/layouts/partials/plugin/image.html +++ b/layouts/partials/plugin/image.html @@ -39,12 +39,12 @@ {{- $optimise := .Optimise | default site.Params.image.optimise | default false -}} {{- if not $resource | and $isUrlRemote | and $cacheRemote -}} - {{- with try $remoteResource := resources.GetRemote .Src -}} + {{- with try resources.GetRemote .Src -}} {{- with .Err -}} {{- warnf "%s" . -}} {{ else }} - {{- if $remoteResource.ResourceType | eq "image" -}} - {{- $resource = $remoteResource -}} + {{- if .Value.ResourceType | eq "image" -}} + {{- $resource = .Value -}} {{- end -}} {{- end -}} {{- end -}}