Skip to main content

Overview

CometChatImageBubble renders the image attachment(s) of a media message. It is self-extracting: pass the SDK message and the bubble derives its attachments, caption, and alignment itself, so it works standalone. It supports multiple images with automatic layouts (single, grid, 2×2, and an overflow tile for extra images) and opens a fullscreen viewer when an image is clicked.
Live Preview — interact with the image bubble.Open in Storybook ↗

Usage


Props

message

The image message. The bubble extracts its attachments and caption. Required.

alignment

Override incoming/outgoing alignment. Defaults to sender-vs-logged-in-user.

textFormatters

Text formatters for caption rendering (mentions, URLs).

placeholderImage

Custom placeholder image URL shown while the image loads. Falls back to a default photo icon.

onImageClicked

Fires when an image is clicked (in addition to opening the fullscreen viewer).

className

Additional CSS class applied to the root element.

CSS Selectors


Next Steps

Image Plugin

Plugin behavior, context menu, and conversation preview

Video Bubble

Render video attachments

Message Bubble

The wrapper that hosts bubble content

Theming

Customize colors, fonts, and spacing