Youtube embed size, revisited

If you want all videos to display this way, I highly recommend not adjusting the URL for individual videos, and using the above CSS modification instead.

As mentioned above just go to Admin > Customize > Themes and paste that snippet into your CSS (more modular if it’s in a component, but works fine to add to your main theme too). Should only take a minute. I don’t think there’s a simpler way to do this.

The real “easier” solution here would be for Discourse to make this the default. Most embeds (large images, oneboxes, GitHub code embeds) display full-width and making video embeds behave similarly would look better + be a lot more visually consistent.

However this has been discussed since 2015 and they don’t seem keen to make that change. Note there is also some concern re: mismatch between video width and YouTube thumbnail size / bandwidth required, see: Making embedded (linked) video stretch to the edges of the topic — sounds like that may be the main blocker here. Though as I mentioned in that topic the tradeoff seems basically unnoticeable…

That was last year, not sure if the Discourse team may have any new thoughts on YouTube size. But yeah this comes up fairly often and I’ve learned that making this the default in Discourse core is certainly a bit trickier problem than it would seem :slight_smile:

All that’s kind of academic though, the short story is you can paste in the above snippet in literally like 30 seconds and have glorious full-width YouTube videos on your site!