Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wants to merge 1 commit into from

Conversation

atcastle
Copy link
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.

Copy link
Contributor

@AndrewKushnir AndrewKushnir left a comment

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
Contributor

Presubmit.

Copy link
Contributor

@kara kara left a comment

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
Copy link
Contributor

dylhunn commented Oct 19, 2022

@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.
@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
Contributor

@dylhunn this PR is also rebased. Thank you.

@dylhunn
Copy link
Contributor

dylhunn commented Oct 19, 2022

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
nouraellm pushed a commit to nouraellm/angular that referenced this pull request Nov 6, 2022
…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
@angular-automatic-lock-bot
Copy link

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.

None yet

4 participants