1 comment

[ 2.6 ms ] story [ 9.5 ms ] thread
In the past I've had a lot of issues with YouTube and Vimeo embeds weighing down Lighthouse performance scores. After dealing with this time I wasn't quite happy with the solutions like YouTube Lite, LazyLoading, and Preconnect so I came up with a way to load the video on click without extra JavaScript, but since it's a bit tricky to write I built a generator to build the embed for you from just your video URL.

You can read more here: https://vumbnail.com/examples/srcdoc-iframe-for-lighthouse

Feedback and ideas welcome!