From 87f51550e88a68be8653162f0dad3845405550fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20G=C3=BCnther?= Date: Fri, 30 Aug 2024 11:07:02 +0200 Subject: [PATCH] [BUGFIX] add default src tag --- Resources/Private/Fusion/Prototype/ImageTag.fusion | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Resources/Private/Fusion/Prototype/ImageTag.fusion b/Resources/Private/Fusion/Prototype/ImageTag.fusion index fff5d06..6d740ca 100644 --- a/Resources/Private/Fusion/Prototype/ImageTag.fusion +++ b/Resources/Private/Fusion/Prototype/ImageTag.fusion @@ -3,12 +3,14 @@ prototype(Visol.Neos.ResponsiveImages:ImageTag) < prototype(Neos.Fusion:Tag) { ratio = NULL maximumWidth = NULL maximumHeight = NULL + initialSrcMaxWidth = NULL allowCropping = FALSE sizes = ${Configuration.setting('Visol.Neos.ResponsiveImages.SizesPresets.Default')} @context.asset = ${this.asset} @context.ratio = ${this.ratio} @context.maximumWidth = ${this.maximumWidth} @context.maximumHeight = ${this.maximumHeight} + @context.initialSrcWidth = ${this.initialSrcMaxWidth ? initialSrcMaxWidth : maximumWidth} @context.allowCropping = ${this.allowCropping} @context.sizes = ${this.sizes} @@ -24,5 +26,9 @@ prototype(Visol.Neos.ResponsiveImages:ImageTag) < prototype(Neos.Fusion:Tag) { sizes = ${sizes} } data-sizes = 'auto' + src = Neos.Neos:ImageUri { + asset = ${asset} + width = ${maximumWidth} + } } }