3

I am developing a Bot using Microsoft Bot Framework, In that bot will respond with sending some images to the user. I configured it with slack and skype.

In slack Images are displaying but in Skype nothing coming.

To send pictures I used the following syntax

var replyMessage = "![ImgName](" + ImagesUrl + ")";
                return message.CreateReplyMessage(replyMessage);

Reference dev.botfrmaework.com, The Text property is Markdown section clearly mention how to link an image to reply message.

If I reply with just link like below, skype able to understand and displaying links. But If I mention like above skype not able to understand.

var replyMessage = "[ImgName](" + ImagesUrl + ")";
                return message.CreateReplyMessage(replyMessage);
Lars
  • 9,976
  • 4
  • 34
  • 40
narendramacha
  • 550
  • 6
  • 24

2 Answers2

1

Each channel has it's own peculiarities. Slack happens to be able to process images sent in-line as you've shown above. However, this will not work generically across all channels. To send images generically, add them as attachments:

replyMessage.Attachments.Add(new Attachment()
{
    ContentUrl = "https://upload.wikimedia.org/wikipedia/en/a/a6/Bender_Rodriguez.png",
    ContentType = "image/png"
});
Lars
  • 9,976
  • 4
  • 34
  • 40
  • Using attachments is good, but in my case I am using Form Builder and in the middle of the conversation depends on user choice bot will display some information along with images. Example, Bot will display list of pizzas with images for each pizza. The output would be like below 1. PizzaA image_of_PizzaA 2. PizzaB image_of_PizzaB . . . etc. – narendramacha Jun 29 '16 at 05:18
1

Every channel has it's own issues when it comes to images and links. For instance, the way you send links won't work on FB. it will simply show the links and text.

The same way, the only way to render images in skype as of now is to send it as an attachment and explicitly specify the image format.

Please look this link to see how each platform will react to the markdowns.

And also, for your purpose, I feel adaptive cards will work out more. Try it out and let me know your comments.

Alok Rajasukumaran
  • 381
  • 1
  • 5
  • 20