diff --git a/layouts/partials/article-link/_shortcode.html b/layouts/partials/article-link/_shortcode.html index d22e07d6..3d13844b 100644 --- a/layouts/partials/article-link/_shortcode.html +++ b/layouts/partials/article-link/_shortcode.html @@ -48,18 +48,12 @@ {{ end }} {{ if $target.Params.hideFeatureImage }}{{ $featured = false }}{{ end }} {{ with $featured }} - {{ if or $disableImageOptimization (strings.HasSuffix $featured ".svg") }} - {{ with . }} -
- {{ end }} - {{ else }} - {{ with .Resize "600x" }} - - {{ end }} + {{ $featuredURL := .RelPermalink }} + {{ if not (or $disableImageOptimization (eq .MediaType.SubType "svg")) }} + {{ $featuredURL = (.Resize "600x").RelPermalink }} {{ end }} + {{ end }} - -