diff --git a/layouts/partials/author-extra.html b/layouts/partials/author-extra.html index 640222ad..78a93ee0 100644 --- a/layouts/partials/author-extra.html +++ b/layouts/partials/author-extra.html @@ -1,18 +1,13 @@ {{ $disableImageOptimization := .Site.Params.disableImageOptimization | default false }}
{{ with .data.image }} - {{ $authorImage := resources.Get . }} - {{ if $authorImage }} - {{ if not $disableImageOptimization }} - {{ $authorImage = $authorImage.Fill "192x192" }} - {{ end }} - + {{ $authorImage := "" }} + {{ if or (hasPrefix . "http://") (hasPrefix . "https://") }} + {{ $authorImage = resources.GetRemote . }} {{ else }} - {{ $authorImage := resources.GetRemote . }} + {{ $authorImage = resources.Get . }} + {{ end }} + {{ if $authorImage }} {{ if not $disableImageOptimization }} {{ $authorImage = $authorImage.Fill "192x192" }} {{ end }}