Skip to:
Content
Pages
Categories
Search
Top
Bottom

Disable lazy loading in BP 7.0 (problem on masonry layout)


  • Diabolique
    Participant

    @diabolique

    Hello

    Is there any way to disable lazy loading for recent BP 7.0? Also where is the code handling it? Seems like there is a problem with masonry layout because the size of image is different than replacement box before load.

Viewing 1 replies (of 1 total)

  • Varun Dubey
    Participant

    @vapvarun

    function vap_loading_lazy_attribute_remove_actions() {
    	remove_filter( 'bp_get_activity_content_body', 'bp_core_add_loading_lazy_attribute' );
    	remove_filter( 'bp_activity_comment_content',  'bp_core_add_loading_lazy_attribute' );
    }
    add_action( 'bp_init', 'vap_loading_lazy_attribute_remove_actions' );

    above can help to disable lazy load from activities, you can add inside child theme functions.php or using the code snippet plugin

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar