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:
Message posted by the flow bot:
Message posted by flow as me:
Message posted by flow as me. I then selected "edit" and pressed "send" without making any changes, it magically pops back to full size:
Here's the flow:
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:
Any help with this is appreciated!
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:
Using the plain URL in the browser shows the correct image.
Is there anything I can do? 🙂
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.
@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