Using SharepointOnline. I got pictures url in the form of


I insert them into img src attribute on my sharepoint site, but it showing default gray user picture in Google Chrome and it shows photo only for my account. In Firefox i got my account picture and for another one account. In IE i just not checked.

Tried the SP.ExecutorRequest:

var hostweburl = "https://domain.sharepoint.com";
var appweburl = "https://domain-my.sharepoint.com";
function execCrossDomainRequest() {
var context;
var factory;
var appContextSite;

context = new SP.ClientContext(appweburl);
factory = new SP.ProxyWebRequestExecutorFactory(appweburl);
appContextSite = new SP.AppContextSite(context, hostweburl);

var executor = new SP.RequestExecutor(appweburl);

            appweburl +
        method: "GET",
        headers: { "Accept": "application/json; odata=verbose" },
        success: successHandler,
        error: errorHandler
function successHandler(data) {

function errorHandler(data, errorCode, errorMessage) {

Ran it in chrome's console and got myself in errorHandler with errorCode=-1007. So i tried the way from another question: Enable Cross-Domain Profile Photos in SharePoint Online Got the same result: almost working in Chrome and FF and not working in IE11. I want to make it work in IE and Google Chrome, please help.

2 Answers 2


I dont have fix to your issue, but will tell a workaround we have implemented. I have faced a similar kind of issue in one of my project, while trying to display user profile picture using SPServices, it was working in chrome and FF but not in FF. The issue was due to cross-site publishing feature, I guess the configuration for cross-site publishing has to be done in Farm/Web application level, which is not accepted as it will affect entire farm. So, we decided to create a user control (.ascx) which will programatically fetch the user profile picture and display it. We have added the user control to Master page so that it is visble in all the pages. Just try it.


Found a workaround using a separate custom list with 2 columns: "Photo" and "User". That is no CORS happening and the script just get photo urls from list by comparing the user's id from the column "User".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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