mirror of
https://github.com/angular/angular.git
synced 2026-11-23 07:05:14 -05:00
NgOptimizedImage declares a `srcset` input, so a `[srcset]="..."` binding
is captured by the directive and never reaches the `<img>` element. The
directive only reads that input for a conflict check, so with
`disableOptimizedSrcset` the image ended up with no `srcset` at all. The
only way to set one was `[attr.srcset]`.
Now, when `disableOptimizedSrcset` is set and the directive isn't
generating its own srcset, the value from the `[srcset]` binding is
written back to the element.
Fixes #49335
(cherry picked from commit 2cecc4aa60)