yireo / Yireo_NextGenImages

44 stars 26 forks source link

Suggestion for fetch priority high on Magento product overview page #75

Open chaukarman opened 4 months ago

chaukarman commented 4 months ago

Since Magento 2.4.6 we have loading=lazy on all images on a product overview page. A suggestion from the MaxServ team to render the first 3 images on a catalogue page with fetch priority="high" by default when installing this module. By doing this the images "above the fold" will have a higher priority than the other product images on the page. Or maybe a field in the backend to make it configurable.

jissereitsma commented 4 months ago

Thanks. The problem is just that "the fold" is not a thing that you can't decide upon in PHP. It only exists in the browser. What about some custom category widget that consumes the entire page, so that all product pages are below the fold? I'm not sure if this should be part of this module (a module with a focus on NextGen images, not on everything that is related to images). Perhaps a simple widget of JavaScript is sufficient?