Skip to content

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

Open

Description

@arshil42

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.

Activity

  1. Sarala-932 commented on Nov 19, 2026

    @Sarala-932

    Hi @arshil42, is anyone working on this? If not, I'd love to fix it and submit a PR !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions