Display sprite from URL

Display sprite from URL
0

I am getting this error: ‘SecurityError: The operation is insecure.’
for this code:

    var winSize = cc.director.getWinSize();
    var that = this;

    var imageURL = "https://discuss.cocos2d-x.org/uploads/default/original/3X/c/9/c9a024cd3656916ac85bb3a01034f8075bc8f827.png";
    cc.loader.loadImg(imageURL,  {isCrossOrigin : true}, function(err, texture)
    {


        var spriteTest = new cc.Sprite(texture);
        spriteTest.setPosition(winSize.width / 2, winSize.height / 2);
        that.addChild(spriteTest);
    });

why are you using our logo via a URL?

Thanks for replay :slightly_smiling_face:
Its a multiplayer game, So to display user images.

oh so using our logo is just an example?

yes. images like Facebook or twitter like any social media profile images

did you read this thread: [SOLVED] Load external sprites from an URL