• Resolved davidmonnuar

    (@davidmonnuar)


    Hello,

    as a SiteGround client I’m using SG Optimizer for my website.

    I was not happy with my theme lazy load built-in functionality so I decided to switch with the SG Optimizer one.

    When I enabled it for the first time it didn’t work. So after an investigation I’ve discovered that my theme was overriding the change made by the class Lazy_Load_Images by using different levels of priority.

    In order to solve the issue I had to modify the priorities of all the add_filter functions called in the Lazy_Load_Images class that in the latest version of the plugin are using the default value.

    It would be nice if you could solve this issue in future updates so that I don’t have to modify the plugin every time a new version is released.

    Best regards

    • This topic was modified 5 years, 3 months ago by davidmonnuar.
    • This topic was modified 5 years, 3 months ago by davidmonnuar.
    • This topic was modified 5 years, 3 months ago by davidmonnuar.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Stanimir Stoyanov

    (@sstoqnov)

    SiteGround Representative

    Hey @davidmonnuar

    We use the default filter priority, which is 10.

    We’ve tried different priorities and our test showed us that the default priority works the best.

    If we change the priority and hook later, the content may be changed by other plugin and the optimization won’t work.

    I would suggest you to disable your theme lazy loading, because duplicating functionalities always leads to issues.

    Regards,
    Stanimir

    Thread Starter davidmonnuar

    (@davidmonnuar)

    Hello,

    the built-in lazy load feature of my theme was already disabled when I’ve done the changes reported above.

    Unfortunately just disabling it was not enough to prevent the overwriting of the content.

    Is it possible to define in my custom functions.php something able to change the priority of the filters?

    Best regards

    @sstoqnov,

    +1

    It appears SG’s lazyloading feature also stopped working on our website.

    Our theme’s lazyloading feature is also disabled.

    We confirmed the above by inspecting several of our images. The class returned for two of them, for example, is provided below.

    https://prntscr.com/qcnsu1

    https://prntscr.com/qcntsn

    In order to confirm SG’s lazyloading is working, what other indicator is available to us?

    Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Improve Lazy Load add_filter priority’ is closed to new replies.