cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper V
Helper V

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
Highlighted
Super User
Super User

Re: Apply to each and HTML

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
Highlighted
Super User
Super User

Re: Apply to each and HTML

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

Highlighted
Helper V
Helper V

Re: Apply to each and HTML

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
firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

Join the new Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Top Kudoed Authors
Users online (10,180)