MicrosoftDocs / msteams-docs

Source for the Microsoft Teams developer platform documentation.
https://aka.ms/teamsdev
Creative Commons Attribution 4.0 International
281 stars 502 forks source link

Image set to stretch size on adaptive cards doesn't work in Teams when expand images is set to true #9040

Open danielmacedo90 opened 1 year ago

danielmacedo90 commented 1 year ago

Following the docs and using "msteams": { "allowExpand": true } for my images in adaptive cards, images set to stretch are not resized.

Sample JSON:

{
  "type": "AdaptiveCard",
  "version": "1.2",
  "body": [
    {
      "type": "TextBlock",
      "size": "extraLarge",
      "weight": "bolder",
      "text": "Test Full Width (Expand Image)",
      "wrap": true
    },
    {
      "type": "Image",
      "size": "stretch",
      "url": "[URL_IMAGE]",
      "altText": "",
      "msteams": {
        "AllowExpand": true
      }
    },
    {
      "type": "TextBlock",
      "text": "Test Full Width (Expand Image)",
      "wrap": true
    }
  ],
  "msteams": {
    "width": "full"
  }
}
ghost commented 1 year ago

Hi danielmacedo90! Thank you for bringing this issue to our attention. We will investigate and if we require further information we will reach out in one business day. Please use this link to escalate if you don't get replies.

Best regards, Teams Platform

Meghana-MSFT commented 1 year ago

@danielmacedo90 - Could you please confirm if clicking on expand icon is giving blank screen? It gives blank screen until I switch to another chat and come back. Could you please confirm if you are facing the same?

https://github.com/MicrosoftDocs/msteams-docs/assets/81138249/4b1ae574-859e-43f2-920e-ba149a44650e

danielmacedo90 commented 1 year ago

@Meghana-MSFT the same happens here.

Meghana-MSFT commented 1 year ago

@danielmacedo90 - We have raised a bug for the same, we will keep you posted on the updates.

danielmacedo90 commented 1 year ago

@Meghana-MSFT - What about the image not being resized on the adaptive card when using the stretch size together with the allow expand? Has a bug ever been reported?

Thank you for your attention!

Meghana-MSFT commented 1 year ago

@danielmacedo90 - We are able to repro the size issue, we have raised a bug for the same. We will keep you posted on the updates. Thank you.

Stretch with Allow expand: image

Stretch without Allow expand: image