We are trying to show images stored in SharePoint sub-site, on an external internet facing public website. We are currently trying to use an external accessible link from SharePoint to show the image on the public website. We then created an HTML image tag on the external website and set its “src” attribute to the SharePoint’s externally accessible link. Something like the following Example https://mycompany.sharepoint.com/sites/images/webimages/myimage.png'/>
However this does not seem to work for me. I have made sure that SharePoint allows external Sharing of individual files. See image below
I have also tested that I can generate an external link of an image, send it to external user who is able to open the link and see that image. See image below.
The issue we are facing is that the externally accessible link gives us a URL for a SharePoint Out-of-the-Box webpage which have options like "Show original", "Download", etc. instead of the link to the actual image which is required to render the image in the external website. Furthermore when I click “Show Original” option the webpage opens the actual image ('https://mycompany.sharepoint.com/sites/images/webimages/myimage.png’). However when I ask the external user to access the link it redirects them to Microsoft Office login page.
I am struggling to find a solution to this. I was wondering if anyone has faced this problem and knows a solution for it. If not then does anyone knows of any work around to Use SharePoint/One Drive for generating links so that they can be used/embedded in external websites.
Any help is appreciated. Thanks In Advance