Do Not Lazy-Load the First Images
Tells WordPress to skip lazy loading for the first three images on a page, which usually improves Largest Contentful Paint.
Opens WPIDE on
Code
add_filter( 'wp_omit_loading_attr_threshold', function () {
return 3;
} );
How to add this snippet
- Install WPIDE on your WordPress site (it is free) and open Code Snippets.
- Use snippet above adds it from the library in one click. Or copy the code into a new snippet with the same code type.
- It is added inactive: review the code and settings, then switch it on.