-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support <img loading="lazy" /> attribute #1542
Comments
One thing I didn't think about is that Image actually render img tag just for convenience & the actual rendering is using css |
RN's |
Yeah I will probably try to make another API with more restriction to handle images via img on the web & Image in RN for the moment. |
This comment has been minimized.
This comment has been minimized.
To solve this issue, I think that I'm able to propose a PR that would make Without the createRNElement PR, we have to copy paste the View code to have an underlying element instead of a div. Another interesting point is that createRNElement could help solving the issue temporary by creating an img element more easily. So @necolas , why is this off topic, please? |
Closing as this feature is being tracked in #1786 |
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
The text was updated successfully, but these errors were encountered: