Loading images eager for above the fold images #13
-
My image variants are generated on the fly, this means that on some occasions the image might take some time to be processed and sent to the user. Because of this I implemented the Unlazy thumbhash functionality. This works great, but for images which are directly visible in the viewport, I have to remove the Is it possible to load the images with import { lazyLoad } from '@unlazy/core';
lazyLoad('img[loading="lazy"], img[loading="eager"]'); |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Sure, this should be working. In the end, any valid selector will work. It will be passed into this unlazy/packages/core/src/lazyLoad.ts Line 26 in 4adca71 Have you tested this? Can you provide more information? |
Beta Was this translation helpful? Give feedback.
Sure, this should be working. In the end, any valid selector will work. It will be passed into this
for..of
loop:unlazy/packages/core/src/lazyLoad.ts
Line 26 in 4adca71
Have you tested this? Can you provide more information?