Ok, let's check now what we've done:
1. This is how the video should look in the visual mode of your WP editor after altering,
an empty space:
2. This is how the video looks on post after saving:
You can add more code, if you want in order to center your video, sizes, etc. I am happy with the result, and I have no desire to add more code to my site :)
If you want to have a clear view on how videos load before proceeding, here is a post with three youtove videos embed:
https://gottapics.com/best-of-drones-regarding-price-quality...
Refresh the page, see how they are lazy loading. If satisfied, proceed with applying the info from this tutorial
3. Proof of lazy loading. I refreshed my page and print screen with the post loaded without the video:
Tips:
Make sure you don't have ads bloker active on your site. Make no sense and can affect your site functionality.
Check your post speed with
https://developers.google.com/speed/pagespeed/insights/
or any other you prefer.
Do it before altering the code. Do it after, see the difference.
Check the speed twice. I have no idea why, but almost all the time, the first check shows bad results.
Do that for both before and after - check twice.
Please comment bellow if in doubt, or have anything to add.
I hope this is useful, good luck to you all!
I am not exactly sure where, though I believe the answer is in this statement "You’ll want to add this to a .js file and enqueue it along with the rest of your Javascript files in functions.php."
But a screenshot on this may help the less tech-savvy people on knowing where to add the codes.
Molly G