From a9189fd7c7c6502c83276332bc53d8492a897494 Mon Sep 17 00:00:00 2001 From: George Cushen Date: Sat, 17 Jul 2021 10:39:39 +0100 Subject: [PATCH] perf: optimise size and format of section backgrounds --- wowchemy/layouts/partials/widget_page.html | 1 + 1 file changed, 1 insertion(+) diff --git a/wowchemy/layouts/partials/widget_page.html b/wowchemy/layouts/partials/widget_page.html index bb67cc5f..0917c84a 100644 --- a/wowchemy/layouts/partials/widget_page.html +++ b/wowchemy/layouts/partials/widget_page.html @@ -53,6 +53,7 @@ {{ if $bg.image }} {{/* See Hugo note on linking assets in styles: https://github.com/gohugoio/hugoThemes#common-permalink-issues */}} {{ $bg_img := resources.Get (printf "media/%s" $bg.image) }} + {{ $bg_img = $bg_img.Fit "1920x1920 webp" }} {{ if $bg_img }} {{ $style_bg = printf "%sbackground-image: url('%s');" $style_bg $bg_img.Permalink }} {{ else }}