Skip to main content
Support

Making Video Embeds Responsive

Videos you embed from YouTube, Vimeo, and other providers automatically fill the width of your article and resize with the window. No custom code needed.

Taylor
Updated by Taylor
1 min read
You don't need code for this any more. Video resizing is automatic in our V5 templates, so there's nothing to set up.

Videos you embed from YouTube, Vimeo, and other providers automatically fill the full width of your article and resize with the window, keeping their aspect ratio. You don't need any custom code for this πŸ“Ί

It works for any video you add with an Embed block, whether you insert it by URL or by embed code.

A video from another provider that's pasted into an HTML block won't be resized (YouTube and Vimeo still are). Use an Embed block instead.

Keeping a Video at a Fixed Size

If you'd rather a video stayed at the size you set, add the noresize class to its embed code. You can do this one video at a time, and the rest will keep resizing.

If You Added Our Old Snippet

This article used to include a JavaScript snippet that did the same job. It relies on jQuery, which our current templates don't load, so all it does now is log an error in your browser's console.

If you've got it in your account, you can safely remove it from Settings > Customize > Code > JavaScript.

What did you think of this doc?

Previous Using Different List Styles Next Stopping Video Embeds from Resizing

Get in touch