OneDrive File Issues

Embed OneDrive for Business Images in HTML or Email

Steven ParkerSteven Parker Nov 14, 2026 868 views

Question details

The user wants to embed images stored in OneDrive for Business or SharePoint in HTML or email.

Embed OneDrive for Business Images in HTML or Email
Product
OneDrive for Business and SharePoint
Device & OS
not provided
Scenario
Use a JPG, PNG, or SVG stored in OneDrive for Business or SharePoint as the source of an HTML image.
Observed behavior
A standard sharing link does not directly display the image in an HTML image tag.
Before you start

Check whether your organization permits the image to be shared with the intended audience. For email, identify the clients recipients use and plan to test the image in those clients.

Solution 1Recommended

Create a Base64 image data URI with Power Automate

Use this workaround to place image data directly in HTML when a OneDrive for Business sharing link cannot serve as an image source.

Data URI support varies across email clients. Some Outlook clients, including the iPhone app, may not display the image, and it may disappear in forwarded messages or replies.

1
Create a flow

In Power Automate, select Create and choose a flow with a trigger suited to your task, such as an instant cloud flow.

2
Retrieve the image

Add the OneDrive for Business or SharePoint Get file content action and select the image file or its identifier.

3
Build a data URI

Add a Compose action and use an expression such as concat('data:image/png;base64,', base64(body('Get_file_content'))). Replace image/png with image/jpeg or image/svg+xml as appropriate, and use the actual action name if it differs.

4
Insert and test the image

In your HTML editor or email action's HTML view, insert the Compose output as the src of an img tag. Send a test and check it in the recipients' email clients, including a reply or forward.

Create a Base64 image data URI with Power Automate
Email compatibility varies: A data URI that works in a browser may be blocked or omitted by an email client. JPG or PNG is generally a safer email choice than SVG, but all formats still require testing.
Free Microsoft Office alternative

Create Image-Rich Documents with WPS Office

WPS Office is a free, lightweight Office alternative with familiar editing tools and Microsoft Office format compatibility, making it easier to move existing files into WPS. It does not change how OneDrive for Business sharing links work in HTML or email.

Insert images into documents and presentations using familiar editing toolsWork with Microsoft Office formats, including DOCX and PPTXOpen existing Office files to help make migration straightforwardUse a free, lightweight suite for everyday document editing
microsoft office alternative - wps office

Frequently Asked Questions

Why doesn't a OneDrive for Business sharing link work in an img tag?

A standard sharing link can lead to a sharing page or require authentication rather than returning the image file directly. OneDrive for Business does not provide the personal OneDrive embed feature for these images.

Can I embed a SharePoint image using Power Automate?

Yes. Add SharePoint's Get file content action to a flow, convert the content to Base64, and use it in a data URI in the image tag. Test the result in the browser or email clients that will display it.

Will a Base64 image display in every Outlook client?

No. Data URI support varies between Outlook clients, and the image may not appear in the iPhone app or in forwarded messages and replies. Send test messages to the clients your recipients use.

Can I use an SVG image in an HTML email?

SVG support varies across email clients. If an SVG does not display, try a PNG or JPG version and test the message again in the relevant clients.