[Question] How to avoid extra image space in MS Teams?
System Information (Required)
- SDK Language: <.NET/C#>
Issue Description
I am using markdown to display a table of information in a note. The code works fine all except for the image I am displaying in my table. Is there a trick/easy way I can avoid this extra space in the markdown table. Below shows my code and what my bot is currently producing in teams. (It may be important to mention that the image is currently stored in left hand side of the first row of the second table)
EDIT I have tried removing the image from the table and the issue is still present. For some reason inserting an image gives an extra space of about 256 x 256 pixels for me. I am mostly using images 56 x 56 or 128 x 128.
Thanks for any help.
Code Example
string row1 = "", row2 = "", row3 = "", row4 = "", row5 = "", row6 = "", tableone = "",
tabletwo = "", Comment = "";
// This is the first table and it displays perfectly fine in MS Teams
StringBuilder sb = new StringBuilder();
sb.AppendLine(">| Table One: "+ tableone+ "||");
sb.AppendLine("|:----|----:|");
sb.AppendLine("| Row 1:|" + row1 + "|");
sb.AppendLine("| Row 2:|" + row2 + "|");
sb.AppendLine("| Row 3:|" + row3 + "|");
sb.AppendLine("| Row 4:|" + row4 + "|");
sb.AppendLine("| Row 5:|" + row5 + "|");
sb.AppendLine("| Row 6:|" + row6 + "| \n\n");
// This is the second table that has the extra space where the image is
// The image I'm using is only 56 x 56 pixels
sb.AppendLine(">| Table Two: " + tabletwo + "|");
sb.AppendLine("|:---|");
sb.AppendLine("| *" + Comment + "* |");
sb.AppendLine("| |");
Expected Behavior
A table that cantins the image in a column with no extra space:
Actual Results
A table that has a ton of extra space where the image is located
Here is what happens when I include the image before the table or any other text:
It's also important to mention that this issue occurs for all attempts to add an image in MS Teams using markdown, not just when its in a table
I'm noticing this too and played with several ways to try to correct but no luck. I will enter a bug for our engineering to look into this.
@RichMoeMSFT Has this fix been implemented?