web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Embedding an image int...
Power Automate
Answered

Embedding an image into a Teams message - image too small

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I've created a flow that takes today's Dilbert comic image from the web and posts it as a message. I'm alost there, but have fallen at the last hurdle!
The issue I have is that the image posted is too small. If I post the image myself, it looks nice and big as it should be. And the the weird thing is, if I edit the message posted as me using flow, it enlarges it and fills the message box.

 

Message posted manually by me:

mccoydblueloop_5-1616111030577.png

 

Message posted by the flow bot:

mccoydblueloop_1-1616110871146.png

 

Message posted by flow as me:

mccoydblueloop_2-1616110898757.png

 

Message posted by flow as me. I then selected "edit" and pressed "send" without making any changes, it magically pops back to full size:

mccoydblueloop_4-1616110960680.png

 

Here's the flow:

mccoydblueloop_7-1616111196508.png

The substring pulled from the HTML and being inserted in the <img> tag is this:

 

 

https://assets.amuniversal.com/6e112be05f5701394ecc005056a9545d

 

 

I've tried adding a width="600" but it doesn't work. So I had no option but to inspect the Teams page which not being a web designer or coder, is probably pointless, but it seems to put it in a image.ts container that is 300px wide:

 

Screenshot 2021-03-18 235958.png

 
 
 
 

Any help with this is appreciated!

Categories:
I have the same question (0)
  • Verified answer
    DamoBird365 Profile Picture
    8,942 Microsoft Employee on at

    @Anonymous 

     

    Really quite an interesting idea!  When can I come and work with you guys?  Comics in the morning 👍

     

    I had success with:

    <img class="ts-image" target-src="@{outputs('Compose')}" width="803.5714285714286" height="250" lazy-load="true" data-tid="messageBodyImageSrc" style="width: auto; height: auto" src="@{outputs('Compose')}">

     

    Where I have inserted the url into a compose.  

     

    I found that if I removed the width and height it shrunk back down to a mini version.  Maybe you could have a play with that string and report back?  Hopefully that is helpful.

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
    Cheers,
    Damien


    P.S. take a look at my new blog here

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Yes, that works! I've put the substring generated by the flow in there. Looks perfect. I'm guessing the 803.5714285714286 number is the proportionate width when the height has to be 250px? In any case, that works as intended.

  • FabvE Profile Picture
    79 on at

    Hi,

    I know this thread is quiet old but the suggested solution doesn't work (anymore?) for images hosted on SharePoint and New Teams.

    When I use the above method my posting looks like this:

    FabvE_0-1720160175864.png

    Using the plain URL in the browser shows the correct image.

    Is there anything I can do? 🙂

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 308

#2
David_MA Profile Picture

David_MA 256 Super User 2026 Season 1

#3
Expiscornovus Profile Picture

Expiscornovus 226 Most Valuable Professional

Last 30 days Overall leaderboard