Support Forum

Youtube video links embedding to large

37 Answers

New Answer

MP Mr Papa
Mr Papa
Member

Laura-AlAmery,  the videos normally show up right… personally, think wp devs made a mistake when they removed the size option… but more importantly, when they did, other plugins such as jetpack, can mess up the width…  any chance you are running the jetpack plugin?  if not, can you give us a link to an example so we can examine the html/css?

LA Laura Al-Amery
Laura Al-Amery
Member

Im not running jetpack.

Here is a link to the forum

http://lauraalamery.com/devsite/discussion-forums/forum-welcome/message-from-laura/

MP Mr Papa
Mr Papa
Member

Brandon’s code a few posts back work for me though you might want to add an important directive

.spPostContent iframe {
    max-width: 100% !important;
}
 
its because the oembed link you pasted was using the default youtube width… and wp used to limit the width based on an option in settings, but they removed it and supposedly limited the content… but you can see the result… so more css needed…
TI TIMM
TIMM
Member

I just want to make sure nothing’s changed. I see the “Insert/edit embedded media” option, but it doesn’t seem to work with youtube. I was hoping it would be an easy way to edit the size of the videos for YouTube and Vimeo.

Use the code suggested before?

MP Mr Papa
Mr Papa
Member

with youtube, just paste the url of the video into the post content… no need to embed it yourself, wp will handle it for you…

the code before made it 100%… if you want it smaller, you will need to specify the size…

TI TIMM
TIMM
Member

Okay, thanks. I asked because the “Insert/edit embedded media” function has window sizes, so I thought it might be easier to inserting code… and more flexible. So it’s basically one size fits all is the only option here? Or am I missing something?

MP Mr Papa
Mr Papa
Member

yes, by default anyways, the wp oembeds are design for full width…  you can use css to style differently, or from youtube get an embed code where you can set the size…

TI TIMM
TIMM
Member

Thanks

I’ve tried to use the embed code, but it just remains as text. What’d I do wrong?
MP Mr Papa
Mr Papa
Member

what embed code did you use?  has to be old embed object style, NOT the iframe style…

TI TIMM
TIMM
Member

Oh… I just took the iframe embed code from the YouTube site. It’s the only way I know how to do it.

YS Yellow Swordfish
Yellow Swordfish
Member

Not the iframe embed code. JUST use the url.

MP Mr Papa
Mr Papa
Member

Andy, he wants to grab the size from youtube too… cant do that with the url… have to use the object embed…

from youtube, its share, which gives you the iframe… but down in the options, you can select ‘use old embed code’

personally, I just let it be the youtube default width, but the choice is yours…

TI TIMM
TIMM
Member

I’d like to, but it’s huge in SP for some reason. If folks want to see nose hairs, they can click on full screen. :) It isn’t that large in other applications.

Thanks for the info!

TI TIMM
TIMM
Member

Okay, I’ve tried the old code too, but can’t get it to work. The only way I can get a YouTube video to post is to simply paste the link. Then it’s huge.

When I use the iframe it comes out a nice size on a different (not to be mentioned :) ) forum. But there doesn’t seem to be a simple way to do it on SP. Am I missing something?

What am I doing wrong?

MP Mr Papa
Mr Papa
Member

works fine for me… 

on youtube… select share… select embed… pick custom size… select use old embed code…  copy the embed code…

in your forum…  create a post…  in tinymce, hit the html button… paste in code… update… save post…

example here: