Skip to main content

Notifications

Community site session details

Community site session details

Session Id : wqba3/9+y/yIKfboY4v/Bf
Power Automate - General Discussion
Answered

Embedding an image into a Teams message - image too small

Like (0) ShareShare
ReportReport
Posted on 19 Mar 2021 00:03:49 by

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!

  • FabvE Profile Picture
    79 on 05 Jul 2024 at 06:17:09
    Re: Embedding an image into a Teams message - image too small

    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? ๐Ÿ™‚

  • Community Power Platform Member Profile Picture
    on 19 Mar 2021 at 08:23:15
    Re: Embedding an image into a Teams message - image too small

    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.

  • Verified answer
    DamoBird365 Profile Picture
    8,942 Microsoft Employee on 19 Mar 2021 at 07:41:26
    Re: Embedding an image into a Teams message - image too small

    @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

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

Thomas Rice โ€“ Community Spotlight

We are honored to recognize Thomas Rice as our March 2025 Communityโ€ฆ

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the dailyโ€ฆ

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,508 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,342 Most Valuable Professional

Leaderboard
Loading started
Loading complete