Files
angular/packages/common
arturovt ad2f291ba0 fix(common): let NgOptimizedImage pass a [srcset] binding through when srcset optimization is disabled
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)
2026-09-29 22:04:47 +00:00
..
2025-11-06 10:03:05 -08:00