# JPG/PNG to Scene.environmentTexture?

**URL:** <https://forum.babylonjs.com/t/jpg-png-to-scene-environmenttexture/43892>\
**Category:** Questions\
**Tags:** material\
**Created:** [September 6, 2023, 9:16am UTC](https://forum.babylonjs.com/t/jpg-png-to-scene-environmenttexture/43892 "2023-09-06T09:16:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![DWork](https://avatars.discourse-cdn.com/v4/letter/d/7993a0/32.png) [@DWork](https://forum.babylonjs.com/u/DWork)\
**Post date:** [September 6, 2023, 9:16am UTC](https://forum.babylonjs.com/t/jpg-png-to-scene-environmenttexture/43892/1 "2023-09-06T09:16:39Z")

</div>

How to set jpg/png as reflection texture for Scene.environmentTexture?

---

<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:** [September 6, 2023, 11:21am UTC](https://forum.babylonjs.com/t/jpg-png-to-scene-environmenttexture/43892/2 "2023-09-06T11:21:24Z")

</div>

You can create a texture by doing `new Texture("url to image", scene)` and set it to `scene.environmentTexture`.

Note, however, that if you want to use the environment texture for PBR materials, you will have to use a prefiltered cube texture. See this doc for more context:

> **[Using An HDR Environment For PBR | Babylon.js Documentation](https://doc.babylonjs.com/features/featuresDeepDive/materials/using/HDREnvironment)**
>
> Learn about using an HDR Environment in your Babylon.js scene.
