[Resolved] Remove lazyload from Page hero background image

Home Forums Support [Resolved] Remove lazyload from Page hero background image

Home Forums Support Remove lazyload from Page hero background image

  • This topic has 5 replies, 3 voices, and was last updated 4 years ago by David.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1861712
    Canek

    Hello,
    I am using Wp Rocket and I want the background custom image of the page hero of the category blogs to be excluded from lazyloading and if possible to preload them.
    Is there anything I can do?
    Thanks

    #1862060
    Elvin
    Staff
    Customer Support

    Hi Canek,

    I suggest checking WP Rocket’s documentation about this as the theme doesn’t control the WP Rocket’s functionalities.

    I did a bit of research for you and lead me to this – https://docs.wp-rocket.me/article/1144-disable-lazyload-on-background-images

    It’s worth checking out. 😀

    #1862627
    Canek

    Thanks for the reply.
    What I mean is that I can’t find any image “class” of the Page hero background image, to be able to lazyload it as the article you share says.
    How can I know the image “class” to exclude the background images from the categories?
    Thank you

    #1862706
    David
    Staff
    Customer Support

    Hi there,

    the background image isn’t being lazyloaded – very few plugins provide lazy loading for CSS backgrounds, their generally a paid server side option.

    The delay in it being displayed is because its a CSS Background image, the request for that image doesn’t get made until the sites CSS is loaded, whereas an <img> element the request is made during the HTML loading stage.

    With a custom background image there isn’t any easy way to improve its loading, without manually coding the CSS for each place your using the a custom background hero.

    #1863109
    Canek

    Okay. Thank you very much for the information.
    Very useful.
    Thanks for everything.

    #1864192
    David
    Staff
    Customer Support

    You’re welcome

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