Skip to content

feat(common): support height in ImageLoaderConfig and built-i…#66766

Merged
AndrewKushnir merged 1 commit intoangular:mainfrom
SkyZeroZx:feature/add-height-img-directive
Feb 9, 2026
Merged

feat(common): support height in ImageLoaderConfig and built-i…#66766
AndrewKushnir merged 1 commit intoangular:mainfrom
SkyZeroZx:feature/add-height-img-directive

Conversation

@SkyZeroZx
Copy link
Copy Markdown
Contributor

…n loaders

Introduces an optional height property in ImageLoaderConfig, allowing built-in image loaders to generate URLs with explicit height parameters. This improves layout control and enables better support for loaders that require height-based transformations.

Closes #51723

What is the current behavior?

We can take the following example, in which a transformation will not work correctly unless we have an explicit height

https://stackblitz.com/edit/stackblitz-starters-tupnmbnu?file=src%2Fmain.ts

What is the new behavior?

To be able to have an explicit height

@pullapprove pullapprove Bot requested a review from kirjs January 27, 2026 02:03
@SkyZeroZx SkyZeroZx changed the title feat(image-loader): support height in ImageLoaderConfig and built-i… feat(common): support height in ImageLoaderConfig and built-i… Jan 27, 2026
@angular-robot angular-robot Bot added the detected: feature PR contains a feature commit label Jan 27, 2026
@SkyZeroZx SkyZeroZx force-pushed the feature/add-height-img-directive branch from 1740e06 to 982a782 Compare January 27, 2026 02:04
@angular-robot angular-robot Bot added the area: common Issues related to APIs in the @angular/common package label Jan 27, 2026
@ngbot ngbot Bot added this to the Backlog milestone Jan 27, 2026
Comment thread packages/common/test/directives/ng_optimized_image_spec.ts
Introduces an optional `height` property in `ImageLoaderConfig`, allowing
built-in image loaders to generate URLs with explicit height parameters.
This improves layout control and enables better support for loaders that
require height-based transformations.

Closes angular#51723
@SkyZeroZx SkyZeroZx force-pushed the feature/add-height-img-directive branch from 982a782 to 1492370 Compare January 28, 2026 15:03
@JeanMeche JeanMeche added action: merge The PR is ready for merge by the caretaker target: minor This PR is targeted for the next minor release labels Feb 9, 2026
@pullapprove pullapprove Bot requested a review from JeanMeche February 9, 2026 20:41
@JeanMeche
Copy link
Copy Markdown
Member

reviewed-for: public-api

@AndrewKushnir AndrewKushnir merged commit 51cc914 into angular:main Feb 9, 2026
18 of 20 checks passed
@AndrewKushnir
Copy link
Copy Markdown
Contributor

This PR was merged into the repository. The changes were merged into the following branches:

@angular-automatic-lock-bot
Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot Bot locked and limited conversation to collaborators Mar 12, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: common Issues related to APIs in the @angular/common package detected: feature PR contains a feature commit target: minor This PR is targeted for the next minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NgOptimizedImage custom loader give access to height property

4 participants