diff --git a/.changeset/lemon-queens-sneeze.md b/.changeset/lemon-queens-sneeze.md new file mode 100644 index 000000000..c1698d704 --- /dev/null +++ b/.changeset/lemon-queens-sneeze.md @@ -0,0 +1,5 @@ +--- +"@responsive-image/ember": patch +--- + +Better workaround for lazy loading issue in Firefox diff --git a/packages/ember/src/components/responsive-image.gts b/packages/ember/src/components/responsive-image.gts index 0e03fe331..d34e0bf94 100644 --- a/packages/ember/src/components/responsive-image.gts +++ b/packages/ember/src/components/responsive-image.gts @@ -65,9 +65,6 @@ export default class ResponsiveImageComponent extends Component', args.src); @@ -137,13 +134,6 @@ export default class ResponsiveImageComponent extends Component is actually rendered, and a child of - // Otherwise some browsers (FF, Safari) will eagerly load it, although the image isn't the one the browser - // should load given the other source/srcset variants. Also prevents native lazy loading. - if (!this.isRendered && typeof FastBoot === 'undefined') { - return undefined; - } - const url = this.args.src.imageUrlFor(this.width ?? 640); return url; } @@ -229,22 +219,18 @@ export default class ResponsiveImageComponent extends Component {{#each this.sourcesSorted as |s|}} {{/each}}