diff --git a/layouts/partials/cover.html b/layouts/partials/cover.html index da792d75..c6841d9f 100644 --- a/layouts/partials/cover.html +++ b/layouts/partials/cover.html @@ -10,6 +10,8 @@ {{- $pageBundleCover := (.Resources.ByType "image").GetMatch (printf "*%s*" (.Params.cover.image)) }} {{- $globalResourcesCover := (resources.ByType "image").GetMatch (printf "*%s*" (.Params.cover.image)) }} {{- $cover := (or $pageBundleCover $globalResourcesCover)}} + {{/* We are not using the .Param.cover.relative to decide the location of image */}} + {{/* If we have the image in pageBundle or globalResources we can process the image */}} {{- $sizes := (slice "360" "480" "720" "1080" "1500") }} {{- $processableFormats := (slice "jpg" "jpeg" "png" "tif" "bmp" "gif") -}} @@ -26,7 +28,8 @@ {{- end }} - {{- if $cover -}}{{/* i.e it is present in page bundle */}} + {{- if $cover -}} + {{/* i.e it is present in page bundle */}} {{- if (and (in $processableFormats $cover.MediaType.SubType) ($responsiveImages) (eq $prod true)) }}