diff --git a/layouts/partials/cover.html b/layouts/partials/cover.html index 6c7d1ae3..8ba2cd35 100644 --- a/layouts/partials/cover.html +++ b/layouts/partials/cover.html @@ -9,7 +9,10 @@ {{- if $addLink }}{{ end -}} {{- $sizes := (slice "360" "480" "720" "1080" "1500") }} - {{- $processableFormats := (slice "jpg" "jpeg" "png" "tif" "bmp" "gif") }} + {{- $processableFormats := (slice "jpg" "jpeg" "png" "tif" "bmp" "gif") -}} + {{- if hugo.IsExtended -}} + {{- $processableFormats = $processableFormats | append "webp" -}} + {{- end -}} {{- $prod := (hugo.IsProduction | or (eq .Site.Params.env "production")) }} {{- if (and (in $processableFormats $cover.MediaType.SubType) ($responsiveImages) (eq $prod true)) }}