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
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
Hi Ismael, Thanks a lot, it works fine !
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
It can be closed. Thanks.
Regards,
Jérôme
Hi,
Thank you!
Best regards,
Basilis