If it possible to prevent lazy loading for images above the fold?

There seems to be a slower loading of the site logo or images above the fold so it would be useful if it's possible to exclude those from lazy loading.

Comments

nravens created an issue. See original summary.

marcoka’s picture

Yes that hurts LCP ratings as i saw today when i checked the pagespeed tool because it complains abaout images above the folt beeing lazy loaded.

Edit found some useful docs about the "attr"
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attr-loading

prudloff’s picture

We encountered this problem as well but I don't think native_lazy_loading_preprocess_image() has enough context to know where the image will be displayed (or even to know which field it comes from).
I think the solution will be to use the new functionality from core (#3324493: Comparison with Drupal Core lazy loading, future of this module) as it can be enabled/disabled on each field.

prudloff’s picture

Status: Active » Closed (won't fix)

This module is obsolete, you should use the core functionality instead.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.