Skip to content
Landing Pages

Embed an external media file

Last updated: May 14, 2021

Applies to:

Marketing Hub  Professional, Enterprise
Service Hub  Professional, Enterprise
CMS Hub  Professional, Enterprise
Legacy Marketing Hub Basic

You can embed external media files, such as YouTube videos, in a rich text module in your pages, blog posts, and knowledge base articles. Videos can also be embedded in the video module in drag and drop areas of pages or the drag and drop email editor

To track interactions with a video, learn how to add HubSpot Video to your content instead.

Supported media types

The embed feature supports URLs in oEmbed format, which is common for most media types. Platforms that use the oEmbed format include YouTube, Spotify, and Vimeo. For a full list of supported media providers, see the oEmbed documentation.

Media files with additional security, such as private YouTube videos, are not supported.

Embed an external media file in a rich text module

Please note: external media files cannot be embedded in rich text modules in marketing emails. 


You can embed a media file in a rich text module by pasting the URL directly into the rich text editor. If you see an error message when adding your media file's URL, HubSpot recommends inserting the embed code instead. 

Embed an external media file with a URL

Embed an external media file with an embed code

  • In your HubSpot account, navigate to website pages, landing pages, blog, or knowledge base.
  • Hover over your page, post, or article, then click Edit.
  • In the content editor, click the rich text module.
  • In the rich text toolbar, click the Insert dropdown menu and select Embed.
  • In the dialog box, enter the external media file's embed code. You will be shown a preview of your file.
  • Click Insert.

Format an external media file 

  • In your HubSpot account, navigate to website pages, landing pages, blog, or knowledge base.
  • Hover over your page, post, or article, then click Edit.
  • In the content editor, click the rich text module.
  • Click the embedded file.
  • Edit your media file's position, dimensions, and spacing in the toolbar. 
    • To resize your file, enter pixel values for the width and height.
    • To adjust the media file's position within a block of text, click the inline alignment icons
    • To make your video responsive, click the fullWidth full width icon. The video will take up the full width of the device it's viewed on.

Please note: embedded media files with a <script> tag are not supported in full width because they generate dynamic content.

edit-your-embedded-video
  • To edit advanced options for your media file, click the edit edit icon.
    • Developers can edit the style and behavior of an embedded video in the Embed code text field. 
    • By default, media files use lazy loading and will only load if a visitor scrolls to their area of a page. To have your media file start loading when the page loads, click the Loading options dropdown menu and select Eager.  

edit-embed-code-1

Replace an external media file

If you need to replace an embedded external media file, remove the original file, then embed the URL of the new file: 

Embed an external video in a video module 

You can also embed an external video on your page or a marketing email with a video module. This module is only available in drag and drop areas of pages and the drag and drop marketing email editor

Embed an external video in a video module in an email

  • In your HubSpot account, navigate to Marketing > Email.
  • Click the name of the email.
  • In the sidebar editor, click the Video module and drag it into your email.
  • In the content editor, click the video module to edit its options. 
  • Under Video type, select Embed.
  • Enter the Video URL.
embed-your-video-in-an-email
  • Edit your video's dimensions, thumbnail image, and positioning in the left sidebar editor: 
    • Enter a width or height to resize the video. 
    • To customize the video's thumbnail, click Upload images to upload an image from your computer, or click Browse images to add an image from your files tool
    • To ensure your video displays at full width on mobile devices, select the Show as maximum width on mobile devices checkbox. Videos will never display at a width larger than their original dimensions. 
    • To move the video to the right or left, click the Alignment dropdown and select Left, Center, or Right.
    • To add space to the sides of your video, click to toggle the Padding switch on. Enter pixel values for padding in the Top, Bottom, Left and Right text fields or select the Apply to all sides checkbox to apply the same padding to all sides of the video.
  •  

add-padding-to-video-module

Embed an external video in a video module on a page

Please note: the video module can only be added to pages with a drag and drop area.

  • In your HubSpot account, navigate to your landing pages or website pages
  • Hover over your page and click Edit. 
  • In the sidebar editor, click the Video module and drag it into your page.
  • In the content editor, click the video module to edit its options. 
  • In the Video type section of the sidebar editor, select Embed.
  • Enter the Video URL.

embed-external-video

  • Select whether the size of the video will change on different devices:
    • Automatically adjust: your video will be responsive, i.e. it will scale based on browser and device size.
    • Exact width and height: your media will always be this exact size on all devices.
  • If you've set your video to be responsive, select its maximum size
    • Original size: the video will not scale to be larger than its original size.
    • Full width: the video will take up the full width of the device it's viewed on.
    • Custom: the video will not exceed a specific width and height set in the sidebar editor. enter pixel values for its dimensions in the Width and Height text boxes
  • To customize your video's thumbnail image, click Upload to select a new file from your computer, or click Browse images to select an image from your files tool.

adjust-video-size


  • Click Apply changes.