Convert the link generated by OneDrive from https://1drv.ms/i/c/[account_id]/[image_id] to https://1drv.ms/i/c/[account_id]/[image_id]?width=1024" for use in your image tag
OneDrive makes it easy to host images online and share it anywhere. If you intend to add an image from your OneDrive account to your HTML code, it is pretty easy!

Step 1. Upload image to your OneDrive

First, go to your drive account. Then click on the New button and then add the desired image file (or folder), and tadaa! the image is now on your drive.

Step 2. Get the shareable link

Right click on the image in OneDrive and then select Embed. This will then lead to a modal display, then you select Generate HTML Code to embed this photo, choose the size, and include HTML tags if desired. Copy this link to clipboard.

Step 3. Embed link in your code

This is our embedded link. use ctrl+u to review the html code for this page.