Optimally Embedding You Tube Videos

Has anyone found out a way to A. Embed YouTube videos without them being cut off on mobile without using the two column feature and/or B. To embed YouTube videos without them have a big effect on load speed/performance score on Google Load Speed testing? Thanks!

1 Like

Use Youtube Generator Code Generator | YouTube embed code generator
copy & paste the code to where you want it.
This method only uses the test and not the video.
Here is what it looks like on my site: How to Sell Your House in Santa Cruz, CA

If your embed code is not mobile responsive, you can add style=“aspect-ratio: 16 / 9; width: 100%; height: 100%;” to it to ensure it shrinks with the screen and doesn’t get cut off.

2 Likes

Thank you Paul!

Thank you Hanna!

Great tip! May I suggest a category specifically for code samples and tips? There are a bunch of these very useful DIY coding tips that get buried in threads. For example your tip could be an individual post titled Make YouTube Videos Responsive and your tip. That would make it much easier to find in the future.

3 Likes