Question: I followed threejs documentation in vuejs project to import image using :

```
texture.load( "./clouds" )

```

This code is not working, I have to import image using require :

```
texture.load( require( "./clouds.png" ) )

```

Now I want to use functions for sucess or error, so thank's to the internet i found that

```
texture.load( require( "./clouds.png" ), this.onSuccess, this.onProgress, this.onError )

```

The problem is in success function, I want to create a cube with texture and nothing happened. I also tried on success function to add color in material but it didn't work.

```
onSuccess( image ) {

   this.material = new THREE.MeshLambertMaterial( { 
      color: 0xf3ffe2,
      map: image
   }

   this.generateCube()
}

generateCube() {

   let geometry = new THREE.BoxGeometry( 100, 100, 100 );

   this.forme = new THREE.Mesh( geometry, this.material );
   this.forme.position.z = -200
   this.forme.position.x = -100
   this.scene.add( this.forme );

},

```

Answer: 
Your problem is not related to VueJS /ThreeJs (again ^^), you should learn how to use `this` inside a callback, here is a E6 fix :

```
texture.load( require( "./clouds.png" ), t => this.onSuccess(t), e => this.onProgress(e), e => this.onError(e) )

```

<https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions>
You can put your images in the "public" folder.

And then you can load your texture by

```
texture.load( "/clouds.png" )

```