Enhance ImageViewHelper to support additional attributes#91
Closed
georgringer wants to merge 1 commit intob13:masterfrom
Closed
Enhance ImageViewHelper to support additional attributes#91georgringer wants to merge 1 commit intob13:masterfrom
georgringer wants to merge 1 commit intob13:masterfrom
Conversation
If argument loading is provided, always load it and also add all others in 14
achimfritz
reviewed
Mar 19, 2026
| // override if set | ||
| if (isset($this->additionalArguments['loading'])) { | ||
| $tag->addAttribute('loading', $this->additionalArguments['loading']); | ||
| } |
Contributor
There was a problem hiding this comment.
Hi @georgringer , this should already be added 3 lines above:
if ($this->pictureConfiguration->lazyLoadingShouldBeAdded()) {
$tag->addAttribute('loading', $this->pictureConfiguration->getLazyLoading());
}
doesn' t that work?
Contributor
Author
There was a problem hiding this comment.
@achimfritz no as I need most of the teams lazy which is fine but on some hero elements I need eager
Contributor
There was a problem hiding this comment.
This should work already, we use this all the time, like this:
<i:image class="b_startpage-header__background" pictureClass="b_startpage-header__background-picture"
src="{images.0.uid}" treatIdAsReference="1"
width="375c" height="307c"
sources="{
xl: {width: '1920c', height: '711c', cropVariant: 'md'},
lg: {width: '1439c', height: '533c', cropVariant: 'md'},
md: {width: '1279c', height: '474c', cropVariant: 'md'},
sm: {width: '799c', height: '655c'},
xs: {width: '767c', height: '629c'}
}" loading="eager"
/>
Merged
Contributor
|
Hi @georgringer , i close this PR, we released 4.0.0, and there is a test s. 5760526 , if any problems exists, please create another issue. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If argument loading is provided, always load it
and also add all others in 14