From 3152a20a8f0a62bdaa444130053d734fe33cbbf9 Mon Sep 17 00:00:00 2001 From: gijoe88 Date: Wed, 13 Aug 2025 11:46:11 +0200 Subject: [PATCH] fix: remove double negation Double negation was resulting in "if at least one of .imageHeight or .imageWidth is provided, then ...". Now it's "if both .imageWidth and .imageHeight are provided, then ..." --- layouts/partials/index_profile.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/partials/index_profile.html b/layouts/partials/index_profile.html index 6882f39bfa..349382fcbf 100644 --- a/layouts/partials/index_profile.html +++ b/layouts/partials/index_profile.html @@ -13,7 +13,7 @@ {{- end -}} {{- $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))) }} + {{- if (and .imageHeight .imageWidth) }} {{- $img = $img.Resize (printf "%dx%d" .imageWidth .imageHeight) }} {{- else if .imageHeight }} {{- $img = $img.Resize (printf "x%d" .imageHeight) }}