How to get of a loaded model?

loader.setPath( directory );
	loader.load( filename+ext, function (obj) {
		if(obj.hasOwnProperty('scene')) importModel.bufferObject = obj.scene;
		else importModel.bufferObject = obj;
		//get all the textures that the imported model uses
		importModel.uniqueImages = [];
		importModel.bufferObject.traverse( function(child) {
			if (child instanceof THREE.Mesh) {
	console.log(;    //<-- this outputs 'undefined'
				try{ if(importModel.uniqueImages.indexOf( == -1) importModel.uniqueImages.push(; }catch{}
		//create the textures in our format
		importModel.uniqueImages = importModel.uniqueImages.filter(e => e != null);
		if(importModel.uniqueImages.length > 0) importModel.convertImages();
		else importModel.convertBufferObject();
	},function (obj) {},function (error) {
		error = String(error).replace("THREE.","");

I am trying to retrieve the image.src of the texture when loading a model, however I can’t seem to find it… In older versions of gltfloader it worked just fine, but now it doesn’t… Where can I find the embedded image.src used for the models?

If you use


You could expand this property in console and find the relative path you’re looking for…

yes, I have done that… I am looking for this:

but it is undefined.

To get it to be defined I have to add:

delete window.createImageBitmap;

to my code, but why?

When I don’t use the…

delete window.createImageBitmap;

It becomes an imagebitmap…
Is there a way to get the image data from that? or to convert it to a regular image?

What are you trying to do with access to the texture? Can you not just dispose of the maps texture property all together and assign your custom texture?

I have images that my program uses, and I need to compare the textures that loaded models have to see if they match any of the images in my program… I also operate on the images, and use the images to determine how to work with the models… I’m actually not using the imported models, I’m just using the importer to get the data of the geometry and images and then constructing my own objects based on my custom parameters and data combined with the imported stuff… So I need to be able to look at the image.src and compare pixel data and that sort of thing…

Seems as though I can do this:

            if(typeof !== 'undefined'){
  				imageSrc =;
  				let img =;
  				let canvas = document.createElement('canvas');
  				canvas.width = img.width;
  				canvas.height = img.height;
  				let ctx = canvas.getContext('bitmaprenderer');
  				if(ctx) {
  				else {
  				imageSrc = canvas.toDataURL();
  				canvas = null;
  				ctx = null;

This will allows me to get the data without having to edit the modules or delete the createImageBitmap.