Link previews managed server-side in v5.12 and later

What change was made?

Prior to v5.12, image link and YouTube previews were managed client-side so they would render regardless of the Enable link previews System Console setting. In v5.12 and later, all image, YouTube and link previews are managed server-side, hence controlled by the Enable link previews setting.

How does this affect my deployment and how do I prepare?

If you expect image link and YouTube previews to render in your Mattermost instance, Enable Link Previews must be set to true. In config.json,

"EnableLinkPreviews": true

In addition, if your servers internet access is restricted, please ensure your server is connected to the internet and has access through the firewall to the websites from which previews are expected, such as,, and any other websites that users may share frequently.

Why was this change necessary?

  1. Centralized control of previews: This change provides a centralized way for admins in locked down deployments to control and audit the content being embedded in posts. Prior to v5.12, any image links posted in a channel would render with no ability to control which sites rendered previews, since the previews were managed client-side. Now that link previews are managed server-side, Admins within locked down networks can whitelist the sites for which they want to allow previews.
  2. Proper scroll correction: Prior to v5.12, image previews were loaded after the rest of the content on the page causing random screen position jumps as the user scrolled through posts. Now that link previews are managed by the server, the post metadata is stored and used to correct the scroll position and eliminate random scroll jumps while content loads.
  3. Faster loading times: With preview content now being managed and stored on the server, there is a noticeable decrease in loading times for embedded content in posts.
  4. Future feature support: Mattermost is increasing in complexity as we build new features to meet the needs of our customers. Supporting image previews client-side is going to become more fragile and potentially introduce more bugs as we expand functionality around scrolling and reading messages, such as the ability to mark a channel as unread.

Avoiding Surprises

We are working internally to adjust our processes so any future breaking changes will have more significant lead time and warning for our customers and community to prepare. See an example of our deprecation policy that outlines the process for announcing deprecated features to the community.

1 Like