This repository has been archived by the owner on Mar 3, 2023. It is now read-only.
Support for Preload in Image component #105
bitforcesrl
started this conversation in
Ideas + Feature Requests
Replies: 1 comment
-
Hydrogen-UI is a toolset that works across React-based frameworks, like Next, Remix, etc. So this would be difficult to do here, as we would have to build an adapter for each framework. At the moment, we don't plan on doing things like that, so this sort of functionality would probably have to live in your code for now. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
@frehner The image component is aware of all infos needed to add a preloader tag in the header to preload the image image preloading
It would be great to add an input param <Image preload="true" ...props/> to push in the head the needed script.
It's possible to preload also responsive images with sourceset like the code wil look like this
imagesizes
comes from Image's sizes prop andimagesrcset
comes from the internal Image function that generate all cdn.shopify image URLs using this Image's widths propwe can now leverage the new flag
fetchPriority="high"
which will imrprove more the LCP scoreBeta Was this translation helpful? Give feedback.
All reactions