• Hi,

    I tried using the additional CSS area for adding CSS class to the Image, but it seems to be adding it to the Cover Block not the Image inside it.

    <div class="wp-block-cover alignfull has-custom-content-position is-position-bottom-left home-top"><img width="1024" height="768" class="wp-block-cover__image-background wp-image-17696" alt="" src="/wp-content/uploads/2021/09/abc.png" data-object-fit="cover" data-src="/wp-content/uploads/2021/09/abc.png" data-done="Loaded"><div class="wp-block-cover__inner-container">
    <p class="has-text-align-center has-large-font-size">ABC</p>
    </div></div>

    I want to add “no-lazy” class to this Image to avoid lazy loading as it’s on the top of the page. I have already used the filter –

    add_filter( ‘wp_lazy_loading_enabled’, ‘__return_false’ );

    to disable the default lazy loading but the lazy loading script I use, adds Lazy class if “no-lazy” has been specifically added.

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Add class to Cover Background image’ is closed to new replies.