From 182a3a4663571e05d341ee7a44cc447877f2cfb9 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sat, 7 Oct 2023 05:18:33 -0400 Subject: [PATCH 1/2] Fix wrong template variable name when using content/image/single_with_height_allocation.tpl --- src/Content/Image.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Content/Image.php b/src/Content/Image.php index cc2fd5122c..6adfa9dd76 100644 --- a/src/Content/Image.php +++ b/src/Content/Image.php @@ -39,7 +39,7 @@ class Image $media = Renderer::replaceMacros(Renderer::getMarkupTemplate('content/image/single_with_height_allocation.tpl'), [ '$image' => $PostMediaImages[0], '$allocated_height' => $PostMediaImages[0]->getAllocatedHeight(), - '$allocated_max_width' => ($PostMediaImages[0]->previewWidth ?? $PostMediaImages[0]->width) . 'px', + '$allocated_width' => ($PostMediaImages[0]->previewWidth ?? $PostMediaImages[0]->width) . 'px', ]); } } else { From b8ead0539f27c4ea816ff535aa19261f90464e6f Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sat, 7 Oct 2023 06:09:52 -0400 Subject: [PATCH 2/2] Limit width of height allocated image to parent width --- view/global.css | 1 + 1 file changed, 1 insertion(+) diff --git a/view/global.css b/view/global.css index ecab5a1c15..f49f8ac5e2 100644 --- a/view/global.css +++ b/view/global.css @@ -715,6 +715,7 @@ figure.img-allocated-height { position: relative; background: center / auto rgba(0, 0, 0, 0.05) url(/images/icons/image.png) no-repeat; margin: 0; + max-width: 100%; } figure.img-allocated-height img{ position: absolute;