[resolved] How does YouTube embed work? (2 posts)

  1. kgagne
    Posted 4 years ago #


    When I place a YouTube video's URL into a blog post, it automatically converts to the embed code. Neat feature! It even knows to span the width of my post column. But how does WordPress determine the height of the embedded video? Since not all YouTube videos are of identical proportions, it seems like WordPress would need to know the dimensions of the original video. How does it get that info?

    I don't know much PHP but tried poking around in the WordPress code. All I found was a default size of 425 x 350, which isn't true in all cases.


  2. kgagne
    Posted 4 years ago #

    Ah! It's likely via oEmbed.


Topic Closed

This topic has been closed to new replies.

About this Topic