RocketChat / RocketChat/Rocket.Chat

Rocket.Chat image preview "base64 undefined"

Open
#36,767 4 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

Description:

When using Filesystem as file storage, it fails to generate an image preview. I mounted a Backblaze bucket to /mnt/rocketfs using s3fs and then mounted that directory to /opt/rocketfs in the container. File upload and download work fine. But it can't generate a preview.

data:image/png;base64,undefined

Failed to load resource: net::ERR_INVALID_URL

These are what I'm seeing in browser console.

Steps to reproduce:
  1. Mount a B2 Bucket using S3fs
  2. Mount that dir to container in the compose file
  3. Set Filesystem as file storage in Settings
Expected behavior:

Preview should be generated normally

Actual behavior:
Image
Server Setup Information:
  • Version of Rocket.Chat Server: 7.9.3
  • License Type: Starter
  • Number of Users: 2
  • Operating System: Ubuntu
  • Deployment Method: Docker
  • Number of Running Instances: 1
  • DB Replicaset Oplog:
  • NodeJS Version: v22.16.0
  • MongoDB Version: 8.0.12 / wiredTiger (oplog Enabled)
Client Setup Information
  • Desktop App or Browser Version:
  • Operating System:
Additional context
Relevant logs:

[2025-08-21T10:42:31.260Z] INFO 41779381-fa11-44d7-a4d9-508351821fd4/BROKER: ✔ ServiceBroker with 2 service(s) started successfully in 688ms.
{"level":50,"time":"2025-08-21T11:24:21.150Z","pid":1,"hostname":"69c272881f98","name":"System","err":{"type":"Error","message":"Input buffer contains unsupported image format","stack":"Error: Input buffer contains unsupported image format"},"msg":"Input buffer contains unsupported image format"}
{"level":50,"time":"2025-08-21T11:29:26.452Z","pid":1,"hostname":"69c272881f98","name":"System","err":{"type":"Error","message":"Input buffer contains unsupported image format","stack":"Error: Input buffer contains unsupported image format"},"msg":"Input buffer contains unsupported image format"}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no source file, test, or entry point. Start by tracing filesystem-backed image preview generation from the reported data:image/png;base64,undefined value and the Input buffer contains unsupported image format log. Done means previews generate normally for a filesystem mounted from an S3fs-backed B2 bucket without browser or server errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, typescript
Domain
backend, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.