diff --git a/layouts/partials/helpers/get-author-image.html b/layouts/partials/helpers/get-author-image.html index 914a5ed..b4cfe8f 100644 --- a/layouts/partials/helpers/get-author-image.html +++ b/layouts/partials/helpers/get-author-image.html @@ -18,12 +18,12 @@ {{ end }} {{ end }} -{{/* apply image processing. don't use "Fit" in svg because its not supported */}} +{{/* apply image processing. don't use "Fit" in svg or gif because its not supported */}} {{ $authorImage:= resources.Get $authorImage}} -{{ if and $authorImage (ne $authorImage.MediaType.SubType "svg") }} + +{{ if and $authorImage (and (ne $authorImage.MediaType.SubType "svg") ( ne $authorImage.MediaType.SubType "gif")) }} {{ $authorImage = $authorImage.Fit "120x120" }} {{ end }} {{/* return the author image link */}} {{ return $authorImage.RelPermalink }} - diff --git a/layouts/partials/sections/home.html b/layouts/partials/sections/home.html index 27ddd31..6303db9 100644 --- a/layouts/partials/sections/home.html +++ b/layouts/partials/sections/home.html @@ -26,8 +26,11 @@ {{ $authorImage = $author.image }} {{ end }} {{ $authorImage := resources.Get $authorImage }} -{{ $authorImage = $authorImage.Fit "148x148" }} +{{/* apply image processing. don't use "Fit" in svg or gif because its not supported */}} +{{ if and $authorImage (and (ne $authorImage.MediaType.SubType "svg") ( ne $authorImage.MediaType.SubType "gif")) }} + {{ $authorImage = $authorImage.Fit "148x148" }} +{{ end }} {{/* get file that matches the filename as specified as src="" in shortcode */}} {{ $src := resources.Get $backgroundImage }}