[Resolved] How to Lazy load background image

Home Forums Support [Resolved] How to Lazy load background image

Home Forums Support How to Lazy load background image

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #620074
    Krystian

    Hello,
    I have a problem with BJ Lazy Load in Generatepress 2.1.3, WordPress 4.9.7.
    I enable every position in settings of BJ Lazy Load plugin and I dont see any difference.
    I have foo-gallery plugin with lazy load function and its working but its only gallery.

    I also checked 4 another very popular plugin at this time (Jully, 2018) with the same reult.

    Do you know whats going on? and hot to really turn on plugin? or did you think to implement lazy load as basic in Generatepress?

    or maybe its another solution because what I need is only to load full section background image when user will be at 10% of that image.

    GeneratePress 2.1.3
    GP Premium 1.6.2
    #620077
    Krystian

    I forgot, my website is optimized as on your instruction:
    https://generatepress.com/fastest-wordpress-theme/

    so I have autooptimize and other staff.

    #620121
    David
    Staff
    Customer Support

    Hi there,

    Most Lazy loaders work by adding a class to all Images in the HTML. Which is used to swap out the image before its fully loaded, or delay the loading until the element is on screen.
    Background images are added in the CSS so there is no HTML for them to be assigned a class. So you need to look for one that supports background images.

    There is this plugin, that says it does, not tested it:

    https://wordpress.org/plugins/wp-image-lazy-load/

    #620359
    Krystian

    https://wordpress.org/plugins/wp-image-lazy-load/

    Thanks, plugin work correctly but when lazy load is on by this plugin, autooptimize kill the gallery. I think its connected with css setup.

    #620379
    David
    Staff
    Customer Support

    Well glad you found one that works, if you can isolate the CSS and JS files that the plugins run then you can exclude them from Autoptimize in its advanced settings.

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