bug: markdown images ![alt](url) are not rendered in messages

Open Beginner friendly
#1,432 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@anikethinge is already working on this.

Since Nov 21, 2026.

  • #1447 by @anikethinge — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
84/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
javascript, react
Domain
frontend

Research direction

Start in packages/markups at InlineElements and check how other parsed node types are rendered. Compare Rocket.Chat's ImageElement in packages/gazzodown to understand the URL sanitizing behavior described in the issue. Add image rendering for the parser's IMAGE node; done when both linked and image-only messages show the image and its alt text, matching the expected behavior.

Written by the indexing model from the issue text.

Description

Description:

A markdown image in a message, ![alt](https://example.com/picture.png), is not shown at all in EmbeddedChat. The text around it is shown, but the image and its alt text disappear, and a message that is only an image renders empty. Rocket.Chat shows the image.

The message parser (@rocket.chat/message-parser) returns an IMAGE node for this syntax:

{"type":"IMAGE","value":{"src":{"type":"PLAIN_TEXT","value":"https://example.com/a.png"},"label":{"type":"PLAIN_TEXT","value":"diagram"}}}

InlineElements in packages/markups has no case for IMAGE, so it returns null. Rocket.Chat's renderer (packages/gazzodown, ImageElement) renders it as an image inside a link, after sanitizing the URL.

Steps to reproduce:
  1. Send look ![diagram](https://example.com/a.png) here.
  2. Send ![](https://example.com/a.png).
Expected behavior:

Both messages show the image, as in Rocket.Chat.

Actual behavior:

The first message shows only "look here", and the second message is empty.

I'd like to send a fix that adds an ImageElement to the markups package, with the same URL sanitizing as Rocket.Chat's.

Dominant language
JavaScript
Stars
171
Forks
421
Avg merge
3d 6h
Merged PRs (30d)
4

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No 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.

More from RocketChat/EmbeddedChat

All issues in RocketChat/EmbeddedChat

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.