From f121999ecfcf04beb2863905c60e4791458c4582 Mon Sep 17 00:00:00 2001 From: Jimmy Cai Date: Wed, 23 Dec 2020 20:54:15 +0100 Subject: [PATCH] refactor: use .Fill for cover image --- layouts/partials/article/components/header.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/partials/article/components/header.html b/layouts/partials/article/components/header.html index 6713515..7582ec2 100644 --- a/layouts/partials/article/components/header.html +++ b/layouts/partials/article/components/header.html @@ -10,8 +10,8 @@ {{- $Srcset := "" -}} {{- if (default true .Page.Site.Params.imageProcessing.cover.enabled) -}} - {{- $thumbnail := $image.resource.Fill "800x250" -}} - {{- $thumbnailRetina := $image.resource.Fill "1600x500" -}} + {{- $thumbnail := $image.resource.Resize "800x" -}} + {{- $thumbnailRetina := $image.resource.Resize "1600x" -}} {{- $Srcset = printf "%s 800w, %s 1600w" $thumbnail.RelPermalink $thumbnailRetina.RelPermalink -}} {{- $Permalink = $thumbnail.RelPermalink -}} {{- $Width = $thumbnail.Width -}}