Sending an image as a reply in messenger

1

I have been trying to send an image as a reply. When using the above code i do not get any reply in messenger. But when using dispatcher.utter_message(attachment=message)

3

I get this in reply . Is there anything that I am missing? Any suggestions ?

Hi @dumjanaakash,

If you are using botfront/rasa-webchat frontend , then you have to send attachement like this:

image = "https://upload.wikimedia.org/wikipedia/en/0/0c/Liverpool_FC.svg"
        message = {
            "type": "image",
            "payload": {
                "title": "Title name",
                "src":image
            }
       }
dispatcher.utter_message(attachment = message)

I am using the facebook’s messenger application. I gave a try with your idea too. But its not showing image. Do you have any idea on it?

Hey @dumjanaakash,

Got it. I am also new to integrating Rasa into facebook, This is what I did on the actions.py I just sent image url in

dispatcher.utter_message(image=image)

Got the image displaying in the FB Messenger, However I tried .svg and its not supporting

Hope it helps!

Thanks a lot. This one did it :smiley: