Youtube Embed Options
If you are like me then you probably embed a lot of Youtube videos in your WordPress posts or in your products pages.
The way I used to do it was to just get the Youtube URL and paste it into my posts, but that made my videos smaller on page and the title was also shown as well as my annotations.
Most Affiliate Marketers and bloggers do it in the wrong way and they just paste the Youtube URL in the post as I used to do.
So how to properly embed Youtube videos in your WordPress or in any other platform?
There are many Youtube embed options and I am going to list the options I use the most.
First of all go to your Youtube video but don't copy the URL, just click on the Share and then on the Embed button.
Then you copy the long iframe.
Here is an example of one of mine.
<iframe width="853" height="480" src="https://www.youtube.com/embed/flUXtOck40w?list=PLP0LbZA7fqLdYbBIbtJ6hfWDK6XeeETRO&showinfo=0" frameborder="0" allowfullscreen></iframe>
And you paste it in the Text editor of your WordPress.
Now you should have your Youtube video embedded in your post, but you can still modify the way your video looks.
Keep reading :).
1. Youtube embed change width / height
If you want to change the width or height of your video just modify the values as shown below.
<iframe width="853" height="480" src="https://www.youtube.com/embed/flUXtOck40w?list=PLP0LbZA7fqLdYbBIbtJ6hfWDK6XeeETRO&showinfo=0" frameborder="0" allowfullscreen></iframe>
2. Youtube embed disable allow full screen
If you want to disable the allow full screen from your Youtube videos just remove the allowfullscreen from the iframe URL you get from Youtube.
<iframe width="853" height="480" src="https://www.youtube.com/embed/flUXtOck40w?list=PLP0LbZA7fqLdYbBIbtJ6hfWDK6XeeETRO&showinfo=0" frameborder="0"></iframe>
3. Youtube embed disable annotations
If you want to disable annotations in your embedded videos, you just need to add &iv_load_policy=3 to your URL like this:
<iframe width="853" height="480" src="https://www.youtube.com/embed/flUXtOck40w?list=PLP0LbZA7fqLdYbBIbtJ6hfWDK6XeeETRO&showinfo=0&iv_load_policy=3" frameborder="0" allowfullscreen></iframe>
4. Youtube autoplay embed option
If you want your videos to play automatically once your page loads, just add &autoplay=1
<iframe width="853" height="480" src="https://www.youtube.com/embed/flUXtOck40w?list=PLP0LbZA7fqLdYbBIbtJ6hfWDK6XeeETRO&showinfo=0&autoplay=1" frameborder="0" allowfullscreen></iframe>
5. Youtube embed remove related videos
If you want to remove the related videos shown at the end of your embedded Youtube video, just add &rel=0
<iframe width="853" height="480" src="https://www.youtube.com/embed/flUXtOck40w?list=PLP0LbZA7fqLdYbBIbtJ6hfWDK6XeeETRO&showinfo=0&rel=0" frameborder="0" allowfullscreen></iframe>
If your video is part of a Youtube playlist, the next video will start at the end.
You can add one or all the parameters mentioned above to a single URL, up to you.
I will keep this post updated when I find something relevant to all the Youtube embed options I use regularly, so keep an eye on it 🙂
For more Youtube Embed parameters you can check them here.
I hope this helps 🙂