• Resolved symisz

    (@symisz)


    First off, thank you for this plugin James.

    It works fine for the backgrounds images in Elementor, however Elementor also has an overlay background. Can you add this selector to the plugin?

    The class is:
    .elementor-background-overlay

    the class with image background is added through the elementor here:
    https://ibb.co/BN7SXbf

    • This topic was modified 4 years, 4 months ago by symisz.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter symisz

    (@symisz)

    because there is no response from the plugin author, i’m adding the solution for anyone interested in using this.

    modify the plugin php file: class-lazy-load-elementor-background-images-public.php
    add the following line to the function “public function elementor_frontend_the_content”:
    ‘/(elementor-background-overlay)/m’,

    it will look something like this:

    public function elementor_frontend_the_content( $content ) {
    // NEW 2020-02-08 … now lazyloads column backgrounds!!! feedback welcome!!!
    // NEW 2020-03-13 … now lazyloads Swiper and Flip Box widget backgrounds from Elementor Pro
    return preg_replace( [
    ‘/(\selementor-section\s)/m’,
    ‘/(elementor-column-wrap)/m’,
    ‘/(elementor-flip-box__front)/m’,
    ‘/(elementor-flip-box__back)/m’,
    ‘/(swiper-slide-bg)/m’,
    ‘/(elementor-background-overlay)/m’,
    ], ‘ $1 lazyelementorbackgroundimages ‘, $content );
    }

    }

    • This reply was modified 4 years, 4 months ago by symisz.
    Thread Starter symisz

    (@symisz)

    beware the single quotation marks are modified within this text field, so i left them out here below:

    /(elementor-background-overlay)/m

    • This reply was modified 4 years, 4 months ago by symisz.
    • This reply was modified 4 years, 4 months ago by symisz.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Overlay background’ is closed to new replies.