Skip to content

fix(common): don't generate srcset if noopImageLoader is used - #47804

Closed
atcastle wants to merge 1 commit into
angular:mainfrom
atcastle:no-noop-srcsets
Closed

atcastle wants to merge 1 commit into
angular:mainfrom
atcastle:no-noop-srcsets

Conversation

@atcastle

Copy link
Copy Markdown
Contributor

This PR fixes a bug where srcsets were being generated even when the noopImageLoader (default) was being used in NgOptimizedImage. Srcsets shouldn't be generated in that case because the noopImageLoader doesn't consume the width value for images.

@pullapprove
pullapprove Bot requested a review from AndrewKushnir October 18, 2022 17:43

@AndrewKushnir AndrewKushnir left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@AndrewKushnir AndrewKushnir added area: common Issues related to APIs in the @angular/common package target: rc This PR is targeted for the next release-candidate common: image directive labels Oct 18, 2022
@ngbot ngbot Bot added this to the Backlog milestone Oct 18, 2022
@AndrewKushnir AndrewKushnir added the action: presubmit The PR is in need of a google3 presubmit label Oct 18, 2022
@ngbot ngbot Bot modified the milestone: Backlog Oct 18, 2022
@AndrewKushnir

Copy link
Copy Markdown
Contributor

Presubmit.

@kara kara left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@AndrewKushnir AndrewKushnir added action: merge The PR is ready for merge by the caretaker and removed action: presubmit The PR is in need of a google3 presubmit labels Oct 18, 2022
@dylhunn dylhunn added action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews and removed action: merge The PR is ready for merge by the caretaker labels Oct 19, 2022
@dylhunn

dylhunn commented Oct 19, 2022

Copy link
Copy Markdown
Contributor

@atcastle @AndrewKushnir This looks to need a rebase.

Do not generate a srcset if the loader being used is the default noopImageLoader. This loader does not take width into account, so it does not make sense to use it with srcsets.
@angular-robot
angular-robot Bot requested a review from AndrewKushnir October 19, 2022 15:32
@AndrewKushnir AndrewKushnir added action: merge The PR is ready for merge by the caretaker and removed action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews labels Oct 19, 2022
@AndrewKushnir

Copy link
Copy Markdown
Contributor

@dylhunn this PR is also rebased. Thank you.

@dylhunn

dylhunn commented Oct 19, 2022

Copy link
Copy Markdown
Contributor

This PR was merged into the repository by commit 38ec156.

dylhunn pushed a commit that referenced this pull request Oct 19, 2022
Do not generate a srcset if the loader being used is the default noopImageLoader. This loader does not take width into account, so it does not make sense to use it with srcsets.

PR Close #47804
@dylhunn dylhunn closed this in 38ec156 Oct 19, 2022
@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 Nov 19, 2022
trekladyone pushed a commit to trekladyone/angular that referenced this pull request Feb 1, 2023
…r#47804)

Do not generate a srcset if the loader being used is the default noopImageLoader. This loader does not take width into account, so it does not make sense to use it with srcsets.

PR Close angular#47804
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 common: image directive target: rc This PR is targeted for the next release-candidate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants