cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Apply to each and HTML

I have this Flow that takes list attachments and puts them in an HTML where it later gets converted to a PDF. These attachments can vary in size which is part of the problem. I can set the sytle in the HTML to make the width to lets say 900px which works great for my larger images. My smaller images then get pixilated because it forces those images to expand to the 900px. If I remove the style, the larger images are cut in half because they expand off the page. Looking for a way in the Append to array variable to make it work for both small and large images.

<img alt="Picture" src="data&colon;image/jpeg;base64,@{outputs('Compose')}"/>

I have also put into a table and set the size to 900px thinking it would not expand the table.

1 ACCEPTED SOLUTION

Accepted Solutions
Gristy
Resident Rockstar
Resident Rockstar

Try and add some CSS to your HTML output.

 

Something like this, adjust values as you need.

 

img {
  display: block;
  max-width:230px;
  max-height:95px;
  width: auto;
  height: auto;
}

View solution in original post

2 REPLIES 2
Gristy
Resident Rockstar
Resident Rockstar

Try and add some CSS to your HTML output.

 

Something like this, adjust values as you need.

 

img {
  display: block;
  max-width:230px;
  max-height:95px;
  width: auto;
  height: auto;
}
Anonymous
Not applicable

You are a rock star, thanks!!

 

<img style="width: autox; max-width: 900px; height: auto;" alt="Picture" src="data&colon;image/jpeg;base64,@{outputs('Compose')}"/>

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (1,507)