Image in adaptive card isn't updated in Teams after the source is changed
Hi team,
Recently I'm working on building a Teams bot app with adaptive card, and one of the cards set the background image with a blob link. During app development, I found the card background image isn't updated in Teams after I uploaded another different image to the same blob URL.
With F12 in Teams web client, I noticed the image URL in Teams is set to "***https://as-prod.asyncgw.teams.microsoft.com/urlp/v1/url/content***?url=https%3a%2f%2fqinezh.blob.core.windows.net%2fshareimages%2fpipeleak%2fblue.png" instead of the actual blob URL. So I guess the issue is related to the image cache in Teams platform, which doesn't refresh the card background image.
I have following questions for the image cache:
- how long is the expiration time for the image cache?
- how to invalidate the cache during app development?
Here's the sample content of the adaptive card:
{
"type": "AdaptiveCard",
"body": [
{
"type": "Container",
"items": [
{
"type": "TextBlock",
"text": "Image Background"
}
],
"backgroundImage": "https://qinezh.blob.core.windows.net/shareimages/pipeleak/blue.png"
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.4"
}
Thanks.