# I want to change the size of an imported image. What should I do?

**URL:** <https://forum.babylonjs.com/t/i-want-to-change-the-size-of-an-imported-image-what-should-i-do/36511>\
**Category:** Questions\
**Tags:** material\
**Created:** [December 13, 2022, 7:46am UTC](https://forum.babylonjs.com/t/i-want-to-change-the-size-of-an-imported-image-what-should-i-do/36511 "2022-12-13T07:46:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hyoungho.jeon](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/hyoungho.jeon/32/28506_2.png) [@hyoungho.jeon](https://forum.babylonjs.com/u/hyoungho.jeon)\
**Post date:** [December 13, 2022, 7:46am UTC](https://forum.babylonjs.com/t/i-want-to-change-the-size-of-an-imported-image-what-should-i-do/36511/1 "2022-12-13T07:46:05Z")

</div>

For example, if the width of the image is 100 and the height is 100, I want to get the image as wide as 50 and as high as 50 from the center of the image.

> **[Babylon.js Playground](https://playground.babylonjs.com/#EKFTE3%235)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

---

<div class="post-metadata">

**Author:** ![DOEHOONLEE](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/doehoonlee/32/16289_2.png) [@DOEHOONLEE](https://forum.babylonjs.com/u/DOEHOONLEE)\
**Post date:** [December 13, 2022, 7:55am UTC](https://forum.babylonjs.com/t/i-want-to-change-the-size-of-an-imported-image-what-should-i-do/36511/2 "2022-12-13T07:55:46Z")

</div>

try below?

```auto
var createScene = function (engine) {
    var scene = new BABYLON.Scene(engine);

    var camera = new BABYLON.ArcRotateCamera("camera1", Math.PI / 2, 0, 1000, BABYLON.Vector3.Zero(), scene);

    camera.attachControl(canvas);

    var light = new BABYLON.HemisphericLight("light1", new BABYLON.Vector3(0, 1, 0), scene);
    light.intensity = 0.7;

    // Ground
    var ground = BABYLON.Mesh.CreateBox("Mirror", 1.0, scene);
    const img = new Image()
    img.src = 'textures/amiga.jpg'
    const width = img.width / 2
    const height = img.height / 2
    ground.scaling = new BABYLON.Vector3(width, height, 5);
    ground.material = new BABYLON.StandardMaterial("ground", scene);
    ground.material.diffuseTexture = new BABYLON.Texture("textures/amiga.jpg", scene);
    // ground.material.diffuseTexture.uScale = 10;
    // ground.material.diffuseTexture.vScale = 10;
    // ground.position = new BABYLON.Vector3(0, -2, 0);

    return scene;
};

```

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [December 13, 2022, 10:40am UTC](https://forum.babylonjs.com/t/i-want-to-change-the-size-of-an-imported-image-what-should-i-do/36511/3 "2022-12-13T10:40:40Z")

</div>

What is the problem with using `uScale` / `vScale`?

You can use the `uOffset`/`vOffset` properties if you want to move the picture:

> **[Babylon.js Playground](https://playground.babylonjs.com/#EKFTE3%236)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes
