• Resolved akharatsidi

    (@akharatsidi)


    I am using Avada theme (lazyload is turned off in theme settings)
    I turn of lazyload in Autoptimize settings too.

    The problem is that if I open the page and press F5 several times, I get some rubbish in src field:
    src=”data:image/svg+xml,%3Csvg%20xmlns=%22https://www.w3.org/2000/svg%22%20viewBox=%220%200%20210%20140%22%3E%3C/svg%3E”

    Check the screenshot: https://yadi.sk/i/Pzr_8bytHcwDlg (frames on the right are missing images on the page). Note that despite lazyload is turned off in autoptimize and theme settings, there seems still to be “lazyloaded” attribute. I don’t understand why.

    This problem appears not only on this page, it appears sitewide.

    If I turn Autoptimize off, everything works just fine: https://yadi.sk/i/KCJnd4TXmdHDkQ
    This shows that “lazyloaded” attribute comes from autoptimize, not theme.

    Here are Autoptimize settings: https://yadi.sk/i/DxQtymo_g056GA

    What am I doing worng? How can I fix that problem?

    The page I need help with: [log in to see the link]

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    Despite the screenshot of the settings showing lazyload is NOT active in AO, I do see Autoptimize lazyload active in the HTML source. Re-check if lazyload is off in the settings, purge any cache you might have (incl. database/ object caching) and test again?

    Thread Starter akharatsidi

    (@akharatsidi)

    Hi! Here are screenshots of Autoptimize and Avada settings:
    https://yadi.sk/i/Ax6sWEH7rzPkAQ
    https://yadi.sk/i/7d07cKfgv0_XIw

    I purged CDN, deleted cache. Here is what I get on the page: lazyload is still somehow active: https://yadi.sk/i/C5UrPqfXpQJbEQ

    Now I turn off Autoptimize, and here what i get after that: https://yadi.sk/i/WcfEiT_ZEjuRqw

    I can give you access to staging site if you need it.

    My purpose is not to get rid of lazyload. I like what autoptimize does and want to use it’s features including lazyload.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    OK, can you enable AO on your stagingsite and provide me with the URL (futtta-at-gmail-dot-com) so I can look at that?

    Thread Starter akharatsidi

    (@akharatsidi)

    I’ve sent you credentials via email.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    I have no explanation but that *something* might be activating AO lazyload using the API but I have not been able to find it (it’s not in the functions.php for example and you don’t have “code snippets” installed), so I added this code to the child theme functions.php to overrule that;

    add_filter( 'autoptimize_filter_imgopt_should_lazyload', '__return_false', 11, 0);

    and that indeed disables AO’s lazyload.

    Thread Starter akharatsidi

    (@akharatsidi)

    Sounds strange. But my purpose is not to turn it off, but to make it work. What can cause the problem that I described in my initial appeal?

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    rubbish in src field: src="data:image/svg+xml,%3Csvg%20xmlns=%22https://www.w3.org/2000/svg%22%20viewBox=%220%200%20210%20140%22%3E%3C/svg%3E"

    that is the placeholder for the actual image, so that is normal, but it _should_ be replaced by the URL in the data-scr attribute which is not happening for some reason. do you get JS errors on the browser console when that happens?

    Thread Starter akharatsidi

    (@akharatsidi)

    I have some errors but they are not connected to image loading afaik:
    – some facebook connect error
    – video file not found (due to it is a staging site and it does not have video uploads in it)
    – some cookie warnings

    Screenshot: https://yadi.sk/i/5uXrkj3wsXertw

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    seems irrelevant … only thing I can think of is that the avada lazyload JS (which I do see loading, in spite of lazyload being off in Avada) kicks in before AO’s does and that this messes things up. maybe try with another theme on your staging site to confirm?

    Thread Starter akharatsidi

    (@akharatsidi)

    Seems that everything works fine if I paste your code into functions.php to turn off Aotptimize’s lazyload and turn lazyload in Avada. In this case lazyload works and images seem not to disappear. Thank you!

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    glad to be able to help, even though it is still a mystery what exactly was happening there and that nags me .. ??

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Some Images disappear when I turn on Autoptimize’ is closed to new replies.