Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1117087

    Hi every one, I have a small problem on enfold using the WPRocket extension. When I activate the lazyload option in order to delay the images loading to save time, the logo never appears in the header. I have first checked on WPRocket forums and I have found some solutions to disable lazyload on a specific image or a specific class but I don’t know how to apply this fix in my case…
    https://docs.wp-rocket.me/article/15-disabling-lazy-load-on-specific-images

    • This topic was modified 1 year, 1 month ago by  cfourtune.
    #1117407

    Hey cfourtune,

    Thank you for using Enfold.

    You can add this filter in the functions.php file to prevent the logo from lazy loading.

    function rocket_lazyload_exclude_src( $src ) {
    	$src[] = 'caramel-mocha-filled-cupcake';
    
    	return $src;
    }
    add_filter( 'rocket_lazyload_excluded_src', 'rocket_lazyload_exclude_src' );
    

    Replace the src value with the actual file name of your logo.

    Best regards,
    Ismael

    #1119107

    Hi Ismael, Thanks a lot, it works fine !

    #1119353

    Hi,

    Great, I’m glad that you got it working. Please let us know if you should need any further help on the topic or if we can close it.

    Best regards,
    Rikard

    #1119468

    It can be closed. Thanks.
    Regards,
    Jérôme

    #1119715

    Hi,

    Thank you!

    Best regards,
    Basilis

Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘WPRocket Lazyload and logo Header’ is closed to new replies.