cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mccoydblueloop
Frequent Visitor

Embedding an image into a Teams message - image too small

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!

1 ACCEPTED SOLUTION

Accepted Solutions
DamoBird365
Community Champion
Community Champion

@mccoydblueloop 

 

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

View solution in original post

2 REPLIES 2
DamoBird365
Community Champion
Community Champion

@mccoydblueloop 

 

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

View solution in original post

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.

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

Users online (12,051)