primary-header Image must not be lazy loaded

  • Author
  • #163103

    Original poster

    Hi there,

    the first image in #primary-header is lazy loaded. This cause an issue with LCP metric.

    Is it possible to remove the lazy load for this one?

    The blog I need help with is:


    Theme Author

    Hello Samuel,

    By default, the theme does not include any functionality to lazy-load images because it’s against WordPress codding standards. However, provides such functionality.

    You can try this code snippet to avoid applying lazy load functionality to the image shown in the page header in singular views:

    function themesharbor_skip_lazy_load_primary_header( $classes ) {
    	if ( is_singular() ) {
    		$classes[] = 'th-featured-image';
    	return $classes;
    add_filter( 'jetpack_lazy_images_blocked_classes', 'themesharbor_skip_lazy_load_primary_header', 999, 1 );

    For custom code snippets on your WordPress site, you can use this free plugin:

    Please let me know if you have any additional questions.

    Kind regards,

The topic ‘primary-header Image must not be lazy loaded’ is closed to new replies.