diff --git a/themes/2026/layouts/_partials/media/display-img.html b/themes/2026/layouts/_partials/media/display-img.html index 1016c378..d64ca59b 100644 --- a/themes/2026/layouts/_partials/media/display-img.html +++ b/themes/2026/layouts/_partials/media/display-img.html @@ -6,14 +6,14 @@ {{- $display := $image -}} {{- if ne $image.MediaType.SubType "svg" -}} - {{- if and (gt $image.Height $image.Width) (ge $image.Height 1080) -}} - {{- $cropHeight := div (mul $image.Width 9) 16 -}} - {{- $display = partial "media/process-image.html" (dict - "image" $image - "action" "Crop" - "spec" (printf "%dx%d TopLeft" $image.Width $cropHeight) - ) -}} - {{- end -}} +{{- if and (gt $image.Height 1080) (ge $image.Height (mul $image.Width 2)) -}} + {{- $cropHeight := div (mul $image.Width 9) 16 -}} + {{- $display = partial "media/process-image.html" (dict + "image" $image + "action" "Crop" + "spec" (printf "%dx%d TopLeft" $image.Width $cropHeight) + ) -}} +{{- end -}} {{- if gt $display.Width $display.Height -}} {{- $maxWidth := 1400 -}}