From f45b5a020daa1e2ebeefc733d24d6f769727673f Mon Sep 17 00:00:00 2001 From: oNya <168719319+oNya685@users.noreply.github.com> Date: Sun, 16 Mar 2025 17:27:42 +0800 Subject: [PATCH] Fix image dimension condition checks Update index_profile.html --- 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 6882f39b..b1430574 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 .imageWidth .imageHeight }} {{- $img = $img.Resize (printf "%dx%d" .imageWidth .imageHeight) }} {{- else if .imageHeight }} {{- $img = $img.Resize (printf "x%d" .imageHeight) }}