• Hello. lazy uploading pictures works great .. please tell me when will you add the lazy upload for youtube.com video? You have a great plugin, and for the lack of lazy video loading, I have to install other plugins for lazy loading ..!

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

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

    (@optimizingmatters)

    not planned for the short term, waiting to see how “native lazy load” turns out (which will likely have support for iframes -so youtube- soon).

    Thread Starter abuki

    (@abuki)

    You don’t have a code that would let youtube videos load in lazy loading mode too? How can I do it ?

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    Well, assuming you have lazyload active in AO, you could try this one (it’s a bit rough around the edges, consider it a Proof of concept);

    
    add_filter('autoptimize_html_after_minify','lazyload_iframes');
    function lazyload_iframes($in) {
    	return str_replace( '<iframe', '<iframe class="lazyload"', $in );
    }

    have fun! 😉
    frank

    Thread Starter abuki

    (@abuki)

    How to replace the src attribute with data-src in the img: tag in all pictures?
    Using function?

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    replacing the src for data-src in image tags is done automatically by Autoptimize when lazyload is active abuki 🙂

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Lazy loading video’ is closed to new replies.