-
AuthorPosts
-
January 20, 2020 at 4:23 pm #1176344
Hello,
It seems that I have the same issue as in threads
https://kriesi.at/support/topic/site-logo-disappears/
https://kriesi.at/support/topic/site-logo-disappears-2/
Please see screenshot
same configuration with lazy loading with WP Rocket
How can I disable the lazyloading just for that position?
Because for the rest of the site lazyloading is working correctlyIt happens sometimes. If I clear wp-rocket cache the problem remains
Thank you Mauro
-
This topic was modified 5 years, 10 months ago by
profumopuntoit.
January 20, 2020 at 5:18 pm #1176359Hey Mauro,
WP Rocket has a filter to exclude lazy loading on selected images. Please try adding following code to bottom of Functions.php file in Appearance > Editor
function rocket_lazyload_exclude_class( $attributes ) { $attributes[] = 'title="Logo"'; return $attributes; } add_filter( 'rocket_lazyload_excluded_attributes', 'rocket_lazyload_exclude_class' );Best regards,
YigitJanuary 20, 2020 at 9:50 pm #1176477Thank you for the quick answer
‘title=”Logo”‘
with the capital letter?Mauro
January 21, 2020 at 6:36 am #1176573Hi,
Yes paste as it is written.
Best regards,
Jordan ShannonJanuary 23, 2020 at 1:13 pm #1177591Thank you
after I opened this ticket I thought that was more a wp-rocket concern to provide a solution and I asked them
They were aware of the issue and they suggest to add in functions.php:/* Compatibility fix for Enfold Main logo with WP-Rocket Lazy-Load */
add_filter(‘avf_logo_final_output’, ‘mip_fix_enfold_logo_wp_rocket’);
function mip_fix_enfold_logo_wp_rocket($logo) {
return str_replace(“<img”,”<img data-no-lazy=\”1\””,$logo);
}Which solution do you think is better?
Mauro
January 23, 2020 at 2:50 pm #1177632Hey,
I referred to their docs to exclude logo from lazyload but if they suggested another solution, please go with their solution :)
Best regards,
YigitJanuary 24, 2020 at 11:54 am #1178086Ok thank you
January 24, 2020 at 2:21 pm #1178119 -
This topic was modified 5 years, 10 months ago by
-
AuthorPosts
- The topic ‘Site logo sometimes disappears’ is closed to new replies.
