Rendering Images in Chat Messages
Overview
Our chat application supports rendering images directly within chat messages using Markdown syntax. This guide will walk you through the process of embedding images in your chat messages and outline the necessary requirements and security considerations.
How to Render Images
To render an image in a chat message, use the following Markdown format:
![image](unique://content/cont_1234)
Steps to Embed an Image
Upload the Image: First, upload the image to the chat. This can typically be done by dragging and dropping the image file into the chat window or using the upload button provided in the chat interface.
Copy the Image URL: Once the image is uploaded, it will be assigned a unique URL in the format
unique://content/content_id
. Copy this URL.Insert the Markdown: In your chat message, use the Markdown syntax to embed the image. Replace
unique://content/cont_1234
with the actual URL of your uploaded image.Example:
![image](unique://content/cont_1234567890abcdef)
Send the Message: After inserting the Markdown, send your chat message. The image will be rendered inline within the chat.
Example
Sending this prompt:
This is an image that i took from a note:\n![image](unique://content/cont_nwnfwd7kq5czq04begyb6ub8)
Generates the following output:
Important Notes
Image Source: Only images that have been uploaded into the chat can be displayed. The image URL must follow the format
unique://content/content_id
.Security Considerations: For security reasons, our chat application does not render images that:
Do not follow the
unique://content/content_id
format.Are not part of the chat the user is currently in.
Content ID: The
content_id
is a unique identifier assigned to each uploaded image. Ensure you use the correctcontent_id
associated with the image you want to display.
Author | @Thea Kitzinger |
---|
© 2024 Unique AG. All rights reserved. Privacy Policy – Terms of Service