Skip to content

Support <img loading="lazy" /> attribute #1542

@MoOx

Description

@MoOx

Is your feature request related to a problem? Please describe.

Recently Chrome added a native way to lazy load images, it would be nice to be able to leverage it.

Describe a solution you'd like

We could simply add support for this attributes that accepts 3 values "auto" (default), "lazy", "eager". We don't have to implement anything beside passing this to the dom <img.

That said, I am not sure what is the best way to implement this for img only as Image rely on View+propsToAriaRole.

Would you be open for a PR to add this as escape hatch into filterSupportedProps?

Describe alternatives you've considered

I think it's best to not really think about that since it's a recent feature, which make sense the way it is imo.

Additional context

It's especially interesting for SSR to get good perf notes for a good SEO :D

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions