Hi, I'm working on a project, where the user is supposed to be able to upload his own images as a texture for an object. Now I'm able to get the image like this: <table id="fileForm"> <tr> <td> <input type="file" id="files" name="file[]"> </td> </tr></table>var handleFileSelect = function(evt){ var files = evt.target.files; var reader = new FileReader(); reader.readAsDataURL(files[0]); var boarding = scene.getMeshByName("Boarding"); reader.onload = function(e) { console.log(e.target.result); //$("#fileForm").append('<img src="'+e.target.result+'"/>'); var mat = new BABYLON.StandardMaterial("mat",scene); mat.diffuseTexture = new BABYLON.Texture(e.target.result,scene); boarding.material = mat; }}$("#files").on("change",handleFileSelect);Now with the commented line: $("#fileForm").append('<img src="'+e.target.result+'"/>'); I can attach the texture to my form, that works like a charm, however I cannot figure out how I can use the loaded image as a texture. As I tried above I just get the error message: "Uncaught TypeError: Cannot read property 'replace' of null" Which is probably because the constructor of BABYLON.Texture expects a URL and instead gets a data stream... But how can I solve this in a way that will work? Thanks for any hints or clues. Dinkelborg