Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #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 ?

    #1143281

    Hey 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,
    Victoria

    #1143306

    Hi 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-images

    Regards
    Alex

    #1143335

    Hi Alex,

    Thanks for sharing :)

    Best regards,
    Victoria

    #1146894

    Dear @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.

    #1147978

    Hi,

    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,
    Ismael

    #1149288

    thanks for all of your reply, solved this problem as you suggested :)

    #1149344

    Hi @ismael will you ship a permanent fix with one of the next Enfold updates? Or do we have to keep the manual fix?

    Best,
    Jan

    #1149387

    Hi Jan Thiel ,

    THis has not been decided yet. It is better to keep the fix for now.

    Best regards,
    Victoria

    #1150531

    Here 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,
    Jan

    #1150638

    Hi Jan Thiel ,

    Thank you for sharing! :)

    Best regards,
    Victoria

    #1212672

    thanks Jan Thiel your reply, solved my issue. :)

    #1213120

    Hi emanar,

    Great, I’m glad that Jan could help you out :-)

    Best regards,
    Rikard

Viewing 13 posts - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.