• Resolved admiraljuicy

    (@admiraljuicy)


    Hello,

    Currently I’m using BBpress, and the avatar images load twice for people that are not logged in (which you can see if you just visit the forum page bellow), one you log on or lazy load is disable this doesn’t happen anymore, I don’t know if this is some kind of conflict between Jetpack and BBPress so if there’s a better fix let me know, if not then I would rather just disable lazy loading of images in the forum pages outright. Just wondering if this would be possible as I don’t want to disable the feature entirely.

    Cheers,

    • This topic was modified 1 year, 9 months ago by admiraljuicy.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • I see what you mean about those duplicate images. I’ve asked our developers to look into this for you.

    In the meantime, could you contact us via this contact form and mention this thread? That way we can follow up with more details once we get an update from our developers.

    @admiraljuicy Jetpack Lazy Images renders two versions of each img tag — one is setup to be lazy loaded, and one is in a?<noscript>?tag as a fallback option for users who don’t have JavaScript enabled.

    If you’re seeing both versions, then something on the site is stripping away the?<noscript>?tag, leaving its contents (the second fallback image) visible. I’d recommend checking if you have any other plugins that are affecting those?<noscript>?tags, and disabling that setting within the other plugin or deactivating that other plugin altogether.

    You can also add the following custom code to the site to disable Lazy Images on bbPress pages:

    // Deactivate lazy load when viewing a bbpress page.
    function deactivate_lazy_load_bbpress( $data ) {
        if ( class_exists( 'Automattic\Jetpack\Jetpack_Lazy_Images' ) ) {
            add_action( 'the_post', array( Automattic\Jetpack\Jetpack_Lazy_Images::instance(), 'remove_filters' ), PHP_INT_MAX );
        }
    
        return $data;
    }
    add_filter( 'bbp_get_template_part', 'deactivate_lazy_load_bbpress', 1 );
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How exclude lazy load from my forum page?’ is closed to new replies.