https://retellai.com/?utm_source=discord&utm_medium=seo logo
In the chat agent, can the user provide image as a...
# ❓・ai-evy-support
d
@AI Evy In the chat agent, can the user provide image as a response and can that image passed of in the Custom Function?
a
Thanks for tagging me @dzei2234. I'll look through relevant sources and get back to you shortly.
### Answer I can’t find any information in the available sources that documents image upload/attachment support in chat agents or passing images into Custom Functions. [(1) ]() [(2) ]() [(3) ]() The Custom Function docs describe Retell sending HTTP requests with function name and parameters (defined via JSON schema / JSON form) , but they only show structured JSON parameters like strings, numbers, etc., and do not mention images or binary/file payloads. [(2) ]() Because this behavior is not explicitly documented, I can’t confirm that a chat user can send an image and have that image passed into a Custom Function. [(1) ]() [(2) ]() Check out these potentially useful sources: [Create Chat]() , [Custom Function]() , [Create Chat Agent]() . If you’d like, I can try to give a general (non‑Retell‑specific) explanation of common patterns for handling images with chatbots and webhooks.
​ To learn more, see the sources I considered: [[1] Create Chat](https://docs.retellai.com/api-references/create-chat) [[2] Custom Function](https://docs.retellai.com/build/conversation-flow/custom-function) [[3] Create Chat Agent](https://docs.retellai.com/api-references/create-chat-agent) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
d
@AI Evy how can I make the chat agent read images and sending them through a webhook?
a
Thanks for the follow-up, @dzei2234. I'll get back to you soon.
### Answer My knowledge is insufficient to answer how to make a Retell chat agent read images and send them through a webhook, because I don’t have any information about image handling or webhook payload formats in the available material. Would you like a general (non‑Retell‑specific) explanation of common patterns for accepting images in chat UIs and forwarding them to a webhook?
message has been deleted
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
d
@AI Evy how do I add the response variable in the custom functions option?
a
Thanks for the follow-up, @dzei2234. I'll get back to you soon.
### Answer To add a response variable in the Custom Function option, you need to map fields from your API response into dynamic variables in the Custom Function configuration UI. [(1) ]() [(2) ]() At a high level, the flow is: 1. Your endpoint returns a JSON response (string / JSON object / etc.) . [(2) ]() 2. In the Custom Function config, under “Set response variables (optional) ”, you define which paths in that JSON should be saved as dynamic variables. [(1) ]() [(2) ]() 3. Those dynamic variables (e.g.
{{user_name}}
) can then be used later in the conversation or in other functions. The docs show an example response body:
Copy code
json
{
 "properties": {
  "user": {
   "name": "John Doe",
   "age": 26
  }
 }
}
…and explain that you can extract a user’s name from the response and reference it later as a dynamic variable like
{{user_name}}
. There’s also a Discord example where the response contained an array and the fix was to reference it with an index (e.g.
patient[0].providerNo
) so that the dynamic variable picks the correct value. [(3) ]() If your response variable still isn’t being populated, double‑check: - That your endpoint returns a 2xx status (non‑2xx like 400 are treated as bad requests) . [(2) ]() [(4) ]() - That the JSON path you configure matches the actual structure (objects vs arrays, correct nesting, etc.) . [(2) ]() [(3) ]()
​ To learn more, see the sources I considered: [[1] Integrate any system with custom function](https://docs.retellai.com/build/single-multi-prompt/custom-function) [[2] Custom Function](https://docs.retellai.com/build/conversation-flow/custom-function) [[3] Custom Function API call response not being saved as dynamic variable](https://discord.com/channels/1186424376300679209/1444715331372322917) [[4] custom function](https://discord.com/channels/1186424376300679209/1354455400996409576) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
d
@AI Evy the chatbot is rendering the following code in ht echat widget insted of delivering the text form of the code: <img src="{{ image | image_url: width: 600 }}" {# Fallback
src
for older browsers or if srcset fails #} srcset=" {%- for width in image_widths_array -%} {{ image | image_url: width: width }} {{ width }}w {%- unless forloop.last -%},{%- endunless -%} {%- endfor -%}" {# IMPORTANT: Adjust the 'sizes' attribute based on your actual CSS layout. This example assumes: - 90% of viewport width on screens up to 767px wide (mobile) - 50% of viewport width on screens between 768px and 1024px (tablet) - 30% of viewport width on screens wider than 1024px (desktop, e.g., for a grid) #} sizes="(max-width: 767px) 90vw, (max-width: 1024px) 50vw, 30vw" alt="{{ image.alt | escape }}" width="{{ image.width }}" {# Original image width for CLS #} height="{{ image.height }}" {# Original image height for CLS #} loading="lazy" {# Native lazy loading #} > how can i have Just the text as an output in the chatbot widget. not a rendered image?
a
Thanks for the follow-up, @dzei2234. I'll get back to you soon.
### Answer I don’t have any information in the available sources about controlling whether the Retell chat widget renders HTML (like
<img>
tags) versus showing it as plain text, or about an option/setting to force “code-style” or escaped output in the widget. [(1) ]() [(2) ]() [(3) ]() Because of that, I can’t say how to make the widget display your
<img ...>
snippet as raw text instead of rendering it as an image. Check out these potentially useful sources: [Retell Website Widget]() , [Platform Changelogs | Retell AI]() , [Chat Widget Customisation]() . If you’d like, I can give a general (non‑Retell‑specific) explanation of common ways chat UIs escape or format code so it shows as text instead of being rendered.
​ To learn more, see the sources I considered: [[1] Retell Website Widget](https://docs.retellai.com/deploy/chat-widget) [[2] Platform Changelogs | Retell AI](https://www.retellai.com/changelog) [[3] Chat Widget Customisation](https://discord.com/channels/1186424376300679209/1387925742007881979) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.