Unable to change dimensions of Youtube video - Gatsby

I am using the embed element and querying it in my HTML with .html which works perfectly fine, but I can't seem to figure out how to change the dimensions of the video itself. I added &maxwidth=900&maxheight=200 to my initial link that I added in Prismic, but it doesn't change anything. Any other solutions or ideas?

Hello Julian, welcome to the Community!

  • Which kind of video source are you embedding to your Prismic fields, could you share it with me?
  • Are you wrapping it inside an iframe or a video tag maybe?

Hey there!
I'm using Youtube videos, and I'm using graphql to query the HTML. the HTML that's automatically generated from a YouTube video is an iframe of course, and has specific dimensions that I can't seem to change (480 x 270).

I'm querying everything correctly, but the "html" that's given doesn't allow me to change the dimensions. I can't use the embed_url as seen in the screenshot, because youtube doesn't allow you to embed something into an iframe without having "/embed/" in the URL, and prismic won't allow a URL with /embed/ in it (it says "This URL doesn't support oEmbed spec"). So basically, my only option is to use the automated iframe with the tiny dimensions.

Hope that makes sense!

Ok, i see what you mean now, and you're right, there's no way of changing that from inside Prismic, and it's weird that the url doesn't recognise the added values. You can do two things instead: