GLB Import & Mapping Image Texture

Hi there, very new to ThreeJS…

I’m trying to map an Image onto my GLB import, however the GLB is just showing up as black. Not really sure where I’m going wrong here.

 let textureLoader= new THREE.TextureLoader();
    let texture = textureLoader.load("images/pexels-luis-quintero-2471234.jpeg");

    texture.flipY = true;

    gltfLoader.load( file.path,  (gltf) => {

        gltf.scene.traverse( (child, key) => {
   
            if(child.isMesh){
                child.material = new THREE.MeshBasicMaterial();
         
                let material = new THREE.SpriteMaterial( { map: texture } );
                let sprite = new THREE.Sprite( material );

                child.material.map = sprite;
            }
        });

});

Thanks for the help!

I’ve written an answer at stackoverflow:

Thank you! I did tty that approach prior, but did find that the image didn’t scale correctly to the GLB when using child.material.map = texture (within the child traverse).

(This is the actual image)
Image:-