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,
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 https://gfycat.com/, https://www.youtube.com/, https://imgur.com/ and any other websites that users may share frequently.
Why was this change necessary?
- 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.
- 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.
- 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.
- 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.
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.