Resolving Image Display Issues in Mattermost Due to Image Proxy Setting

Summary: Images from internal servers may fail to load in Mattermost if the "Enable Image Proxy" setting is enabled. Disabling this setting often resolves the issue by allowing Mattermost to fetch images directly from internal sources without network restrictions.


Problem Description

When attempting to share images from internal servers in Mattermost, users may see a broken image icon. The logs may contain an error similar to:

{"timestamp":"2025-03-27 17:23:42.927 Z","level":"warn","msg":"error fetching remote image","caller":"imageproxy/local.go:155","error":"Get \"https://example.com/image.png\": address forbidden, you may need to set AllowedUntrustedInternalConnections to allow an integration access to your internal network"}

Root Cause

This behavior occurs because the Enable Image Proxy setting is enabled. The image proxy is designed to fetch and relay images from external sources, but it may face network restrictions or access control issues when dealing with internal servers.

Solution

Disabling the Enable Image Proxy setting can resolve this issue. Follow these steps to disable it:

  1. Log in to your Mattermost server as an administrator.

  2. Navigate to System Console > Site Configuration > Posts.

  3. Locate the Enable Image Proxy setting.

  4. Set this value to False.

  5. Save the changes and refresh Mattermost.

Verification

  • After disabling the image proxy, attempt to share the same internal image URL.

  • If the issue persists, ensure the internal URL is accessible via curl from the Mattermost server:

$ ssh <mattermost_server>
$ curl https://example.com/image.png --output temp.png

If curl succeeds but Mattermost still fails, check your server logs for additional clues.


If you encounter additional issues, please contact Mattermost Support.

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.