• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Pictures Size Change When Youtube Video is Embedded In Metro

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › General Discussion › Pictures Size Change When Youtube Video is Embedded In Metro

This topic is: resolved

Tagged: Metro theme., Pictures Alignment, youtube, Youtube embed

  • This topic has 6 replies, 2 voices, and was last updated 13 years, 2 months ago by AnitaC.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • September 3, 2013 at 1:45 am #60375
    Rednasil
    Participant

    Hi,

    I have a little problem with the pictures on my site. When I first add them to the post they are just full size, like this one

    (http://listarama.com/20-adorable-cats-dressed-as-superheroes/)

    But when I embed a youtube video (like on
    http://listarama.com/20-biggest-amusement-parks-across-europe/) the whole formatting changes and the pictures appear smaller and not aligned well.

    And I only see half the pictures on mobile on both posts.

    Anyone any suggestion on how to fix this?

    September 3, 2013 at 7:33 am #60406
    AnitaC
    Keymaster

    It looks like you are adding the iFrame version of the embed code. WordPress added an update to the platform that allows you to just add the URL of the video and it will encode it on to the page for you without using the embed code. You should click the Share button on the video, grab that URL. Then go to the post, select the Text tab and not the virtual tab - paste the URL and Publish/Update. View the post and you will see the video. Try that and see how your images come out.


    Need help with customization or troubleshooting? Reach out to me.

    September 3, 2013 at 9:21 am #60432
    Rednasil
    Participant

    Thanks for your reply Anitac,

    But I'm actually using the youtube url to embed the videos.

    September 3, 2013 at 9:43 am #60442
    AnitaC
    Keymaster

    Okay, try adding this to your Functions.php file at the bottom:

    if ( ! isset( $content_width ) ) $content_width = 600;

    You can adjust the 600 to whatever width you want the video to automatically size at. See if this makes a difference with your images. I added this to one of my clients and it seems to work for them.


    Need help with customization or troubleshooting? Reach out to me.

    September 3, 2013 at 9:53 am #60444
    Rednasil
    Participant

    Before I add the code to my site, I need to say that I think I found what is causing all this.
    I used this code to add credits to my photo captions.


    `add_filter('img_caption_shortcode', 'caption_shortcode_with_credits', 10, 3);

    function caption_shortcode_with_credits($empty, $attr, $content) {

    extract(shortcode_atts(array(

    'id' => '',

    'align' => 'alignnone',

    'width' => '',

    'caption' => ''

    ), $attr));

    September 3, 2013 at 9:59 am #60448
    Rednasil
    Participant

    Okey, I went ahead and added your code anyways and it helped. My pictures are back at their normal size.

    Thanks alot Anitac.

    September 3, 2013 at 10:08 am #60450
    AnitaC
    Keymaster

    Oh good. I don't know why some people have the "tiny" image problem and others don't. Glad it worked for you.


    Need help with customization or troubleshooting? Reach out to me.

  • Author
    Posts
Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble