In my auto hosted app i have this very boring img tag

<img src="https://mydomain.sharepoint.com/sites/test1/Templates/Blog.png"/>

The image is in a asset library where all authenticated users have access.

If i deploy my app on the https://mydomain.sharepoint.com/sites/dev/ site it works fine in firefox or chrome and the image shows perfectly.

However in IE the image does not load. However when i try to open the image url, i can browse to it just fine.

I think something goes wrong because the image is in another site collection. But i find it weird that firefox has no problems.

Does anyone know how to fix this?

  • any errors on the console? – Salvatore Di Fazio May 15 '14 at 10:01
  • try adding https://mydomain.sharepoint.com/sites/test1/ to the trusted sites in IE – Vardhaman Deshpande May 15 '14 at 10:30

A helpful colleague of mine pointed out the solution

The src of the image tag was set during the page load event, firefox and chrome handle this fine, but IE starts messing with SharePoint authentication.

The solution is to not set the src during the page load event, but during the onprerender.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.