WordPress.org

Forums

YouTube Embed Dimensions Not Working (17 posts)

  1. jOt Creative
    Member
    Posted 4 years ago #

    My content width is 590px, but my Youtube videos keep showing up wider than that (640px) and break my layout.

    I was using auto-embed initially, but changing the max width under Settings > Media didn't help. I then tried to use the embed shortcode with a width declared, but that didn't work either.

    I'd like to avoid having to use an object or embed HTML tag, since I know that TinyMCE doesn't play nice with them.

    Can anyone offer any suggestions? Is this a problem with my theme?

  2. webvitaly
    Member
    Posted 4 years ago #

    1. You may paste Youtube or Vimeo link into post but sometimes it does not convert into video corectly.
    2. You may use WordPress default shortcode: [embed width="500" height="400"]http://www.youtube.com/watch?v=wQL34ZiCNVA[/embed].
    3. If you simply want to embed iframe into post you can install iframe plugin and paste this shortcode into content: [iframe width="640" height="480" src="http://player.vimeo.com/video/3261363"]

    More info about embeding iframe into post content.

  3. jOt Creative
    Member
    Posted 4 years ago #

    Thanks, webvitaly.

    1. It definitely auto-embeds, but sizes incorrectly.
    2. I've tried this, but the size still doesn't take.
    3. I don't think I'll go quite that far. I'm getting by with the RokBox plugin for now.

  4. Razorfrog Web Design
    Member
    Posted 3 years ago #

    I'm having this same issue (Maximum embed size not being respected). Example here:
    http://www.kzsc.org/blog/2011/08/16/rave-on-buddy-holly/
    Maximum embed size is set to 620, yet it's displaying at 640.

  5. Adam Losier
    Member
    Posted 3 years ago #

    I would take the iframe embed code straight off youtube and paste it into your post using the HTML screen.

    <iframe width="560" height="349" src="http://www.youtube.com/embed/FgFb6Y-UJUI" frameborder="0" allowfullscreen></iframe>

    I know switching between the HTML and Visual editors when working with YouTube videos can mess things up as well sometimes using the Shortcodes the output will be formatted incorrectly leaving you with default video dimensions.

  6. webvitaly
    Member
    Posted 3 years ago #

    Have you tried to setup width="100%"?
    It works correct in all major browsers and does not depend on theme or WordPress version.

  7. Razorfrog Web Design
    Member
    Posted 3 years ago #

    @bizzyLabs I'm hoping not to use shortcodes or the embed code, but the built-in functionality that swaps out the URL for the video. It works great except for those hidden 20px.

    @webvitaly Just tried 100% inside the Maximum embed size box on the Media Settings page and nothing changed. Is that where you meant?

  8. Adam Losier
    Member
    Posted 3 years ago #

    I just ran some tests on my development environment and production environment to see if I could re-produce your problem, but I'm faced with a different bug on my installs via - http://core.trac.wordpress.org/ticket/17764

    I can't say with 100% accuracy but its most likely an issue with the TinyMCE editor not accepting the Javascript width's set on your media settings page (Possible bug).

  9. Razorfrog Web Design
    Member
    Posted 3 years ago #

    Any other ideas or progress on this? I tested on another install and the same problem exists.

  10. What plugin are you running besides rokbox? Have you tried turning them off or using a different theme?

  11. Razorfrog Web Design
    Member
    Posted 3 years ago #

    I'm not running rokbox (that was drokkon's solution). I did the plugin dance again (disable, re-enable one by one) and actually pinned this problem to Jetpack, strangely enough.

    With Jetpack disabled, the plain text embed (a Youtube URL) respects the max width set under Media Settings. With Jetpack enabled, that value is ignored and the video is embedded at full 640px width.

    I've confirmed this on another site as well.

  12. There's a portion of JetPack that's specifically for embeds. You can disable that and see if it fixes it?

  13. Razorfrog Web Design
    Member
    Posted 3 years ago #

    Yep - it's definitely a conflict with the "Shortcode Embeds" portion. Pretty sure that's a bug though and not the desired functionality. I'll post over in that forum to get it to their attention. Strange.

  14. kai920
    Member
    Posted 3 years ago #

    Nice find razorfrog, I experienced the exact same thing. did you hear back from Jetpack support regarding the conflict with shortcod embeds?

  15. siutouamy
    Member
    Posted 3 years ago #

    I just updated to the latest Jetpack release, and this problem showed up. Anyone else?

  16. jOt Creative
    Member
    Posted 3 years ago #

    Yep. Was working fine until I installed the update. Not sure if RokBox is still the culprit - are you using it, siutouamy?

  17. siutouamy
    Member
    Posted 3 years ago #

    I don't use RokBox. I updated Jetpack in all the three blogs, which all use different plugins and it's the same. The only plugin all the websites have in common is Similar Posts, but deactivating does nothing.

    I might just have to work out a new layout to fit this YouTube resize. LOL

Topic Closed

This topic has been closed to new replies.

About this Topic