You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
NgOptimizedImage: unclear behavior when ngSrcset is used with default image loader #48655
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: commonIssues related to APIs in the @angular/common packagecommon: image directiveopen for contributionsAn issue that is suitable for a community contributor (based on its complexity/scope).
As far as I understand, the URL that is generated depends on the ImageLoader that you have provided. If you haven't provided any, then the default one will just return the path of the image, regardless of the requested width, because that's what allows loading a static image.
changed the title [-]Angular 15 NgOptimizedImage issue[/-][+]NgOptimizedImage: unclear behavior when ngSrcset is used with default image loader[/+]on Jan 9, 2023
We've discussed this topic with the team and we'd like to add a logic to output a warning in case the ngSrcset is present and no loaders are configured (i.e. only the default one is present). The warning should be helpful for cases like the one described in this ticket.
I'm adding the "help wanted" label to see if there is an interest from community members to contribute a PR with this change.
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: commonIssues related to APIs in the @angular/common packagecommon: image directiveopen for contributionsAn issue that is suitable for a community contributor (based on its complexity/scope).
Activity
jnizet commentedon Jan 6, 2023
Hi @Timbo1979
As far as I understand, the URL that is generated depends on the ImageLoader that you have provided. If you haven't provided any, then the default one will just return the path of the image, regardless of the requested width, because that's what allows loading a static image.
AndrewKushnir commentedon Jan 9, 2023
@Timbo1979 as @jnizet mentioned above, there is no image loader configured (see docs), thus there were no image URL transformation performed.
I'm leaving this ticket open to see if we should add a warning when the
ngSrcsetis present and a default image loader is used.[-]Angular 15 NgOptimizedImage issue[/-][+]NgOptimizedImage: unclear behavior when ngSrcset is used with default image loader[/+]AndrewKushnir commentedon Jan 10, 2023
We've discussed this topic with the team and we'd like to add a logic to output a warning in case the
ngSrcsetis present and no loaders are configured (i.e. only the default one is present). The warning should be helpful for cases like the one described in this ticket.I'm adding the "help wanted" label to see if there is an interest from community members to contribute a PR with this change.
Thank you.
atcastle commentedon Mar 4, 2024
@AndrewKushnir Let's just close this issue. It's fixed by #48804
angular-automatic-lock-bot commentedon Apr 4, 2024
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.