YouTube won't resize
-
PLEASE HELP!!!
I’m seriously pulling my hair out here. I’ve searched high and low and can’t find a solution.I am putting youtube videos into my blog, however I would like them to be a small thumbnail, similar to the photos.
No matter what I do, the videos always show up as full width?!?! Massively frustrating.I have tried both the youtube shortcode, and the youtube advanced shortcode. Both show up perfectly in the ‘live preview’ in the shortcode editor. However, as soon as I preview the page, or publish, they’re full width?! WHY? How can I fix this and get them smaller?
I have disabled all plugins and tried it, and it still doesn’t work. I’ve researched everywhere and can not find a solution. Please help.
The current code on the site is:
[su_youtube url="https://www.youtube.com/watch?v=DYWbJ82EeRI" width="400" height="220"]
http://iconcept.mobi/jen2014/stay-abu-dhabi/
-
Hey mate,
Not familiar with the plugin but had a little look and it appears it defaults to video sizing being responsive.
If you add ‘responsive=”no”‘ to your shortcode does it fix your issue?
So [su_youtube url=”https://www.youtube.com/watch?v=DYWbJ82EeRI” width=”400″ height=”220″ responsive=”no”]
Regards,
JoeyThank you so much for your response.
However, unfortunately this is something I have tried, and it does not work πI’ve updated the code on the site if you want to have a look.
Any other suggestions??
It is working with that code testing on my site but when I look at the html your video is wrapped in an extra div and the height and width attributes are not being added to the iframe. This is my code:
<div class="su-youtube su-responsive-media-no"><iframe width="400" height="220" src="http://www.youtube.com/embed/DYWbJ82EeRI" frameborder="0" allowfullscreen="true"></iframe></div>And this is yours:
<div class="su-youtube su-responsive-media-no"><div class="fluid-width-video-wrapper" style="padding-top: 55%;"><iframe src="http://www.youtube.com/embed/DYWbJ82EeRI" frameborder="0" allowfullscreen="true" id="fitvid857653"></iframe></div></div>Sorry if that isn’t very helpful but hopefully will give you a strating point to look! As I said I’m not familiar with the plugin. Will have another little look and see if I can replicate it on my site. Good luck!
Edit: another thing I notice is you have fitvids.js loading up from a youtube plugin (youtube-embed-plus)? This applies the above changes to your code so would explain why it isn’t working. Try disabling that plugin π
I can’t see the code with the `<div class=…..?
All I can see in either the visual or text editor is:
[su_youtube url="https://www.youtube.com/watch?v=DYWbJ82EeRI" width="400" height="220" responsive="no"]Where can I find the code you’re talking about? Sorry I’m just learning. Thanks so much.
Edited my above post as I think I see the culprit π
The code I posted is your outputted html. Using google chrome you right click on the page and choose ‘inspect element’. That will open a window that displays your websites code (this is all in the frontend not the admin side of wordpress as that’s what I have access to)
I deactivated all plugins – except ultimate shortcodes, but still not working?
I tried editing the code, but nothing. I’ve tried looking via inspect element but I can’t see anything (not entirely sure what I need to be looking at to be honest).
I’ve no idea why it just won’t work like it should πDeactivated everything including shortcode ultimates plugin, and used the code you supplied saying it worked on your site, and it still doesn’t work! π
If I deactivate javascript on your site the iframe sizes correctly. Unfortunately, I cannot replicate the error on my site even with the youtube plugin installed.
I know you have tried to deactivate all plugins but looking at the source for the fitvid.js script it appears the youtube plugin is still active. Are you on a multi-site by any chance? (if a plugin is activated for the network it won’t appear on the single site)
I’m sorry but I don’t think I can help you further, pretty new to this myself. I hope you get it sorted!
Yes I deactivated them, It’s not a multi site. I had to turn on the plugins after I tested it again as having them all off was ruining the site and I couldn’t bare to leave it like that overnight.
Thanks for trying. hopefully someone will be able to provide an answer for me??
The topic ‘YouTube won't resize’ is closed to new replies.