Support » Plugin: Autoptimize » How to Lazy Load iFrames

  • Resolved Chris Lemmer

    (@jchrislemmer)


    Hi there,

    Your plugin adds a library that Lazy Loads images, this is great. However, we would also like to Lazy Load iFrames.

    Is it possible to lazy load iFrames with your plugin?

    Thanks
    Chris

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

    (@optimizingmatters)

    That is not possible with AO (yet) Chris.

    Hi there,

    Thanks, we’ll make another plan with the iFrames then.

    Kind regards
    Chris

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    well, that got me thinking; I *think* that if you manually add class="lazyload" to the iframe (or add lazyload to the existing <iframe class=") then (provided you have AO img lazyload active) it will work automatically. worth testing I guess 😉

    Hey there,

    It does actually seem to work.

    I added class=”lazyload” and then changed the src of the iFrame to data-src, and it seems to work. I’ll do some more testing and let you know.

    Thanks
    Chris

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