2 Easy Ways to Embed YouTube Videos in Mattermost

2 Easy Ways to Embed YouTube Videos in Mattermost

The Mattermost online chat system allows you to do a lot before needing to install plugins or integrations. Many additional features are available but need to be enabled in the system console by a user with the system admin role.

This is the case with playing YouTube videos within Mattermost channels and threads. Audio/video media files uploaded directly to Mattermost will show in a pop-up window. URLs to multimedia files will open a new tab. Below we cover:

As of April 2020, Mattermost doesn’t support embedding Vimeo, SoundCloud, Spotify, Vlare, or Clyp.it media files.

Allow Embedding YouTube Videos in Mattermost

Mattermost system admins can enable embedding YouTube videos and other link previews within the System Console or configuration file.

System Console

  1. Log into Mattermost as a system admin
  2. In the upper-left corner, select your username, then System Console
  3. Under Site Configuration, select Posts
  4. Beside Enable Link Previews, select true
  5. Save changes at the bottom
Enable link previews in Mattermost

Configuration File

If you can’t enable link previews in the System Console, you’ll need to edit the raw configuration file.

  1. Log into SSH as root
  2. Edit your Mattermost configuration file:
    nano +33 /opt/Mattermost/config/config.json

    If this isn’t the location of your Mattermost configuration file, you can search for it with the find command:
    find / -name config.json | grep mattermost

  3. Beside “EnableLinkPreviews”, change false to true:
    “EnableLinkPreviews”: true,
  4. Save your changes

User Settings to Allow Link Preview

Mattermost users can disable link previews for their individual workflow or network capabilities. This change applies to all channels and teams the user joins.

  1. Log into Mattermost
  2. In the upper-left corner, select your username, then Account Settings
  3. On the left, select Display
  4. Set Website Link Previews to Off
  5. Select Save and link previews will disappear

If link previews are disabled, YouTube videos shared in the past may not disappear unless disabled by a system admin.

Is your Mattermost team collaborating on music production? Learn more about how to create a musician’s website with WordPress.

Secure and speed up your client's websites with high-performance WordPress VPS plans powered by UltraStack.
InMotion Hosting Contributor
InMotion Hosting Contributor Content Writer

InMotion Hosting contributors are highly knowledgeable individuals who create relevant content on new trends and troubleshooting techniques to help you achieve your online goals!

More Articles by InMotion Hosting

Was this article helpful? Let us know!