• Skip to primary navigation
  • Skip to main content
  • Skip to footer
WPOrbit

WPOrbit

WordPress Hosting with Support & Maintenance

  • Home
  • Services
    • Site Performance Optimisation
    • Malware Clean Up
  • FAQs
  • Blog
  • Contact
  • Login

How to Lazy Load YouTube Videos in WordPress without using a plugin?

With the arrival of Core web vitals everyone is rushing to get the colors changed from red to green. ๐Ÿ™‚

One of the reason your pages & posts might be getting a poor speed score is due to Youtube Video Embeds which loads up external libraries in order for the video player to run.

We have put together a code that will lazyload all the youtube videos on a page or post without the need of any external plugin or library. All you need to do is put the below code in your theme’s functions.php

Footer

CONTACT SUPPORT

Email Us

Create a Ticket

Launch Live Chat

ASSOCIATIONS

LINKS

FAQs
Cancellation & Refund Policy
Privacy Policy
Terms of Service
Contact Us

Copyright © 2023 ยท WPOrbit