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