From 7cb21ff7d742af87eec7051d20c0be1ed14e7303 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Gaya?= <sebastien.gaya@gmail.com> Date: Thu, 22 Dec 2022 21:13:56 +0100 Subject: [PATCH] fix boolean crop value in GetImageUrlOsuny --- layouts/partials/GetImageUrlOsuny | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/layouts/partials/GetImageUrlOsuny b/layouts/partials/GetImageUrlOsuny index 154bdcdf..ab640f0e 100644 --- a/layouts/partials/GetImageUrlOsuny +++ b/layouts/partials/GetImageUrlOsuny @@ -18,9 +18,13 @@ {{ $crop := "" }} {{ if .crop }} - {{ range $cropValues }} - {{ if eq .crop . }} - {{ $crop = . }} + {{ if eq (string .crop) "true" }} + {{ $crop = "center" }} + {{ else }} + {{ range $cropValues }}& + {{ if eq .crop . }} + {{ $crop = . }} + {{ end }} {{ end }} {{ end }} {{ end }} -- GitLab