How do you defer JavaScript analysis for YouTube videos on WordPress?

I just realized today that from my 1.2 MB site (for GTMetrix), 550 thousand is a video on YouTube.

My website is a WordPress site, and the current video is uploaded to an iframe.

I want my site to load faster ... And I'm not sure how to proceed. If I can make the YouTube video not uploaded to a click, and instead there is a thumbnail instead, it seems that this will be the right game?

+4
source share
1 answer

The best and fastest task is to replace the video fragment with something like a link or image and load the iframe on a click or other event.

Ahmed Essam , , Wordpress, Embed Video Thumbnail :

https://wordpress.org/plugins/embed-video-thumbnail/

-1

Source: https://habr.com/ru/post/1650751/


All Articles