Cross domain display image in SharePoint apps

Copper Contributor

In SharePoint hosted app, we have multiple images which refers to URL of SP Host site Image library. On Page load, browser does not load the image because of cross domain restrictions.

Also, tried ajax call to fetch image encoded base-64 from Host site library but we are facing performance issue in that.

Is there any other way to display the cross domain Image in SharePoint hosted app.

1 Reply

@Ashish_Rohilla Hello,

I would recommend using Azure blob storage + CDN, if that could be a possibility for your solution.
Through CDN, you can configure CORS rules and allow certain domains.

Yours sincerely,
Aref Halmstrand