Showing results for 
Search instead for 
Did you mean: 
Post Prodigy
Post Prodigy

Update Compose to Return Dynamic Image

The following returns a specific file (image) for use in a PDF conversion.

I'm returns the same image to every PDF file created regardless of the rest of the content it's the company header image.

I would like to use similar actions to return 'dynamic' content - the image of the employee in the data set. Is this possible?

The below would return the company header image, while another would return a 'output' that is the specific employee's image. 




Community Champion
Community Champion

Where would you get the image of each employee? Do you have images of each employee stored somewhere, or did you mean the image associated with their User Profile?


If from the User Profile, you could use the Get user photo (V2) action which return the Image file content of the photo that you can use essentially the same as you did with your Company Logo.


<img src="data&colon;image/jpeg;base64,@{body('Get_user_photo_(V2)')?['$content']}" />







If I've answered your question, please mark the post as Solved.

If you like my response, please consider giving it a Thumbs Up.

From SP Library or SP List; The images are in both.

I figured out how to get it from an Active Directory, assuming the pic is loaded. However, I have had projects where active directory is not an option.

I wanted to also have a more general use ready to go.

In my test all employees have a pic in the 'CompanyLogo' column of the SP 'Employee List'.

That same photo is in the SP 'Employee Image Library'.

The employee full name (Title/FullName column in SP List) and image name (Title/Name column in SP Library) match.

I'm guessing the anwer is in an edit of the 'Get file content...' action, as it currently calls for a specific image, rather than the image associated with the specific member of the orginal trigger action.. 

Helpful resources

Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (4,351)