# How can I get image from URL and use it as texture?

**URL:** <https://forums.unrealengine.com/t/how-can-i-get-image-from-url-and-use-it-as-texture/286181>\
**Category:** Rendering\
**Tags:** unreal-engine, http, question\
**Created:** [June 18, 2014, 10:02am UTC](https://forums.unrealengine.com/t/how-can-i-get-image-from-url-and-use-it-as-texture/286181 "2014-06-18T10:02:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Talus](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/talus/32/464649_2.png) [@Talus](https://forums.unrealengine.com/u/Talus)\
**Post date:** [June 18, 2014, 10:02am UTC](https://forums.unrealengine.com/t/how-can-i-get-image-from-url-and-use-it-as-texture/286181/1 "2014-06-18T10:02:38Z")

</div>

Hi,

I wonder if I can download an image at the runtine, and use it as Texture, in UI or on some BSP.  
I guess that we can can, but How ?

any ideas ?

thx.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2e84a16e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2e84a16e](https://forums.unrealengine.com/u/anonymous_user_2e84a16e)\
**Post date:** [June 18, 2014, 10:25am UTC](https://forums.unrealengine.com/t/how-can-i-get-image-from-url-and-use-it-as-texture/286181/2 "2014-06-18T10:25:04Z")

</div>

I guess you can use libcurl (which is already included as a UE4 module) and then use a UTexture2D::CreateTransient to create a texture to be applied to a UMaterialInstanceDynamic. Does it make sense?

Some useful links:

> **[How to load and display an image from binary array on console?](https://forums.unrealengine.com/questions/33572/how-to-load-and-display-an-image-from-binary-array.html)**
>
> Dear Friends at Epic, I just noticed that FImageUtils::CreateTexture2D does not work on consoles! /\*\* \* Creates a 2D texture from a array of raw color data. \* \* @param SrcWidth Source image width. \* @param SrcHeight Source image height. \*...

---

<div class="post-metadata">

**Author:** ![anon247819](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anon247819](https://forums.unrealengine.com/u/anon247819)\
**Post date:** [February 17, 2016, 9:58am UTC](https://forums.unrealengine.com/t/how-can-i-get-image-from-url-and-use-it-as-texture/286181/3 "2016-02-17T09:58:44Z")

</div>

Or you just use the Download Image node. Look here:

> **[(39) 's Extra Blueprint Nodes for You as a Plugin, No C++ Required!](https://forums.unrealengine.com/showthread.php?3851-%2839%29-Rama-s-Extra-Blueprint-Nodes-for-You-as-a-Plugin-No-C-Required%21%2Fpage36)**
>
> Dear Community, 🌟 Newest Awesome Feature 🌟 (In Complimentary (no cost) Victory Plugin!) Now You Can Get the Text Output (STDOUT or STDERR) from any .exe program, straight into Unreal Engine! is the output of ⚡ a video compression commandline...

The plugin is not needed if you want to load the texture from the web. The node comes with the standard UE edition.

Hope that helps

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_0dafa81b](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_0dafa81b](https://forums.unrealengine.com/u/anonymous_user_0dafa81b)\
**Post date:** [May 23, 2016, 1:01pm UTC](https://forums.unrealengine.com/t/how-can-i-get-image-from-url-and-use-it-as-texture/286181/4 "2016-05-23T13:01:38Z")

</div>

I’m trying to set material onto object at run-time from texture, normal map, displacement map etc. located in the hard disk. To achieve this i need to create dynamic material instance and set the parameter to the material by loading the image file at run-time.

I’m creating material from texture & displacement map image file. These image files are loading from folder using Victory Plugin’s “Victory Load Texture 2D from File” Node.

I’m creating the material instance dynamic of the “test material”. Now I’m setting the texture and displacement parameter as shown in figure 4.  
After creating material instance dynamic, I’m setting this material to the object.

figure[1] test material:

figure[2] texture:

figure[3] displacement map:

figure[4] Method:

Now here is the problem.

When I directly create material in material editor from texture and displacement map and set it onto object. It doesn’t generate\*\* moiré pattern.\*\*

But when I run-time set the material onto object using figure [4]. It will generate moiré pattern.

Here are the sample screen shots of both.

figure[5]: Material Editor result:

figure[6]: Runtime result: [Imgur: The magic of the Internet](http://imgur.com/ao2XnDk)

I think the “Load Texture 2D from File” nodes is not calculating the Mip Map correctly.

I tried with following nodes but the result is same.  
1\> “Victory Load Texture 2D from File” (Created by rama)  
2\> “Load Texture 2D from File by Extension” (Created by you)  
3\> “Victory Load Texture 2D from File Pixels” (Created by rama)

I hope you will take this request into consideration. I would like to thank you in advance for your time and attention in this matter.  
Should you have any further questions or concerns, please do not hesitate to contact me.

Regards,

---

<div class="post-metadata">

**Author:** ![Kaspi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kaspi](https://forums.unrealengine.com/u/Kaspi)\
**Post date:** [August 5, 2023, 9:44am UTC](https://forums.unrealengine.com/t/how-can-i-get-image-from-url-and-use-it-as-texture/286181/5 "2023-08-05T09:44:28Z")

</div>

> **[Loading Images into your Unreal Engine Projects from a Web Interface](https://www.chauncey.live/learning/stream-images-into-unreal)**
>
> In this tutorial we'll cover how to load images from a hosting service such as Dropbox or Google Drive into your Unreal Engine project after it's been packaged.
