Responsive resizing of embedded iFrame elements?

Has anyone implemented a good solution for responsive resizing of embedded iFrame elements (I’m thinking particularly of videos embedded using oEmbed)? If not, might something like this: http://willrees.com/2015/02/responsive-youtube-oembeds-in-wordpress/ or this: https://gist.github.com/jlengstorf/ce2470df87fd9a892f68 be considered as a possible feature request for core Pressbooks?

Hi @SteelWagstaff, the jQuery solution in the first link is really hacky and I wouldn’t want to have anything like that in core (trying to change page layout with scripts on the front end is something I generally avoid except for progressive enhancement). The latter solution is a good option for consideration. I’ll note that Gutenberg embeds are responsive by default. In the mean time, please feel free to open an issue at https://github.com/pressbooks/ideas for triage. Thanks!

1 Like