-
AuthorPosts
-
September 29, 2019 at 6:18 am #1143063
Just searched the forum, I have found the same problems happened before.
If enable the wp-rocket lazyload option , the logo will not showing on Chrome …
so how to solve this bug ?September 30, 2019 at 10:49 am #1143281Hey moonswamp,
Well, we Enfold does not work well with images lazy loading yet. Please keep that function off for now if you can.
Best regards,
VictoriaSeptember 30, 2019 at 11:36 am #1143306Hi there,
i´m also using wp-rocket and there is an option to disable LazyLoad on specific images:
Have a look here:
https://docs.wp-rocket.me/article/15-disabling-lazy-load-on-specific-imagesRegards
AlexSeptember 30, 2019 at 11:59 am #1143335Hi Alex,
Thanks for sharing :)
Best regards,
VictoriaOctober 10, 2019 at 5:06 pm #1146894Dear @victoria_d, we encountered the same issue and reported it to wp-rocket.
They asked us to open a ticket with you to have this fixed. Here is what I got from WP-Rocket. So the fix (one of the two possibilities) should be easy to apply:
The class=”logo” should be applied to the attribute instead of being in a <span> attribute to be automatically detected and excluded from our LazyLoad option.
Or even simply, they could add a data-no-lazy attribute to this . That way, most self-respecting lazyload solutions, will exclude that image from being lazyloaded.
October 15, 2019 at 7:34 am #1147978Hi,
Thank you for the update.
We can use the “avf_logo_final_output” filter to adjust the final markup of the logo and include the “data-no-lazy” attribute. Usage example can be found in the following threads.
// https://kriesi.at/documentation/enfold/logo/#add-multiple-logos
Related thread: https://kriesi.at/support/topic/id-like-to-add-an-extra-class-to-the-site-logo/#post-1046227
Best regards,
IsmaelOctober 18, 2019 at 2:53 pm #1149288thanks for all of your reply, solved this problem as you suggested :)
October 18, 2019 at 4:43 pm #1149344Hi @ismael will you ship a permanent fix with one of the next Enfold updates? Or do we have to keep the manual fix?
Best,
JanOctober 18, 2019 at 7:37 pm #1149387Hi Jan Thiel ,
THis has not been decided yet. It is better to keep the fix for now.
Best regards,
VictoriaOctober 23, 2019 at 3:30 pm #1150531Here is a working code solution for those searching for a temporary workaround. Afterwards WP-Rocket lazy loading works with Enfold. The logo will neither lazy-load nor disappear ;-)
/* 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); }
Best,
JanOctober 23, 2019 at 8:54 pm #1150638Hi Jan Thiel ,
Thank you for sharing! :)
Best regards,
VictoriaMay 13, 2020 at 5:46 pm #1212672thanks Jan Thiel your reply, solved my issue. :)
May 15, 2020 at 5:20 am #1213120 -
AuthorPosts
- You must be logged in to reply to this topic.