diff --git a/layouts/_partials/cover.html b/layouts/_partials/cover.html index 9c1f9eaa..460e490e 100644 --- a/layouts/_partials/cover.html +++ b/layouts/_partials/cover.html @@ -14,10 +14,7 @@ {{- /* 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") -}} - {{- if hugo.IsExtended -}} - {{- $processableFormats = $processableFormats | append "webp" -}} - {{- end -}} + {{- $processableFormats := (slice "jpg" "jpeg" "png" "tif" "bmp" "gif" "webp") -}} {{- $imgdl := (.Params.cover.image) | absURL }} {{- if $cover -}} diff --git a/layouts/_partials/header.html b/layouts/_partials/header.html index 311f1d50..23d4b04b 100644 --- a/layouts/_partials/header.html +++ b/layouts/_partials/header.html @@ -7,10 +7,7 @@ {{- if site.Params.label.icon }} {{- $img := resources.Get site.Params.label.icon }} {{- if $img }} - {{- $processableFormats := (slice "jpg" "jpeg" "png" "tif" "bmp" "gif") -}} - {{- if hugo.IsExtended -}} - {{- $processableFormats = $processableFormats | append "webp" -}} - {{- end -}} + {{- $processableFormats := (slice "jpg" "jpeg" "png" "tif" "bmp" "gif" "webp") -}} {{- $prod := (hugo.IsProduction | or (eq site.Params.env "production")) }} {{- if and (in $processableFormats $img.MediaType.SubType) (eq $prod true)}} {{- if site.Params.label.iconHeight }} diff --git a/layouts/_partials/index_profile.html b/layouts/_partials/index_profile.html index 6882f39b..88567d4f 100644 --- a/layouts/_partials/index_profile.html +++ b/layouts/_partials/index_profile.html @@ -7,10 +7,7 @@ {{- $img = resources.Get .imageUrl }} {{- end }} {{- if $img }} - {{- $processableFormats := (slice "jpg" "jpeg" "png" "tif" "bmp" "gif") -}} - {{- if hugo.IsExtended -}} - {{- $processableFormats = $processableFormats | append "webp" -}} - {{- end -}} + {{- $processableFormats := (slice "jpg" "jpeg" "png" "tif" "bmp" "gif" "webp") -}} {{- $prod := (hugo.IsProduction | or (eq site.Params.env "production")) }} {{- if and (in $processableFormats $img.MediaType.SubType) (eq $prod true)}} {{- if (not (and (not .imageHeight) (not .imageWidth))) }}