WordPress Development Asked on November 9, 2021
When I embed a Youtube video onto my page, is there a way to change the thumbnail displayed (screenshot)? I do not have admin access to the Youtube video in-question.
I would prefer a non-plugin solution if possible. I found these instructions, but they did not work.
check this out, maybe this will help.
<div class="video-responsive"><iframe src="https://www.youtube-nocookie.com/embed/1Cz2Xzm6knM/videoseries?list=PLq-1Cz2Xzm6knM-1Cz2Xzm6knM&rel=0" width="420" height="315" frameborder="0" allowfullscreen="allowfullscreen"></iframe></div>
.video-responsive{
overflow:hidden;
padding-bottom:56.25%;
position:relative;
height:0;
}
.video-responsive iframe{
left:0;
top:0;
height:100%;
width:100%;
position:absolute;
}
Answered by dig99 on November 9, 2021
The [video]
shortcode can be used with the src
being an URL of a youtube video. To set a placeholder, preview thumbnail use poster
, it even works nicely via GUI. In the end it should look somewhat like the bellow example.
[video src="https://www.youtube.com/watch?v=XYZ" poster="http://example.com/wp-content/uploads/2017/01/example.jpg"]
Answered by Nicolai on November 9, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP