# Trying to import a PNG file from a local folder during runtime to display on a widget

**URL:** <https://forums.unrealengine.com/t/trying-to-import-a-png-file-from-a-local-folder-during-runtime-to-display-on-a-widget/1918491>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, question\
**Created:** [June 27, 2024, 11:57am UTC](https://forums.unrealengine.com/t/trying-to-import-a-png-file-from-a-local-folder-during-runtime-to-display-on-a-widget/1918491 "2024-06-27T11:57:46Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![SOLDIEROSCAR](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SOLDIEROSCAR](https://forums.unrealengine.com/u/SOLDIEROSCAR)\
**Post date:** [June 27, 2024, 11:57am UTC](https://forums.unrealengine.com/t/trying-to-import-a-png-file-from-a-local-folder-during-runtime-to-display-on-a-widget/1918491/1 "2024-06-27T11:57:46Z")

</div>

Trying to import a PNG file from a local folder during runtime to display on a widget

So far I have a way for the user to select the file, and I take that file directory and name and I append a “File://” to the front of it… then it goes to a [Import File as Texture 2D]… then the return value I plug into a [Make Slate Brush] and I add some “Image Size” numbers… then the Slate Brush output goes to a [Set Brush] pointing to the target being my variable widget. But nothing. What am I missing?

[https://imgur.com/a/MJ3H4da](https://imgur.com/a/MJ3H4da)

---

<div class="post-metadata">

**Author:** ![eldany.uy](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/eldany.uy/32/821920_2.png) [@eldany.uy](https://forums.unrealengine.com/u/eldany.uy)\
**Post date:** [June 27, 2024, 12:18pm UTC](https://forums.unrealengine.com/t/trying-to-import-a-png-file-from-a-local-folder-during-runtime-to-display-on-a-widget/1918491/2 "2024-06-27T12:18:53Z")

</div>

have you tried set brush from texture and skip slate step?

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/b/e/abeef3cd1decacd824c9de4448fff6e447796068.png)

---

<div class="post-metadata">

**Author:** ![SOLDIEROSCAR](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SOLDIEROSCAR](https://forums.unrealengine.com/u/SOLDIEROSCAR)\
**Post date:** [June 27, 2024, 12:34pm UTC](https://forums.unrealengine.com/t/trying-to-import-a-png-file-from-a-local-folder-during-runtime-to-display-on-a-widget/1918491/4 "2024-06-27T12:34:09Z")

</div>

same thing happens, nothing shows up.

I keep reading maybe I have to assign it to a plane and maybe make an instanced material? I dont know how to tell unreal engine to “Make a new Texture” just like when you drag in a texture into the editor’s content browser.

Ideally I would do that, “Make a new Texture” and then be able to save it so its there next time for the user.

---

<div class="post-metadata">

**Author:** ![eldany.uy](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/eldany.uy/32/821920_2.png) [@eldany.uy](https://forums.unrealengine.com/u/eldany.uy)\
**Post date:** [June 27, 2024, 3:20pm UTC](https://forums.unrealengine.com/t/trying-to-import-a-png-file-from-a-local-folder-during-runtime-to-display-on-a-widget/1918491/5 "2024-06-27T15:20:24Z")

</div>

it just works

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/3/f/63fe0236ecfe93c551434d1ad91047a4629e71eb.png)

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/7/9/9793a2f890a0d748c087ad001f10854215f218dc.png)

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/9/9/99930a01a4a41e39e9accabea0e7d5a1b17a85e8.jpeg)

I think your problem is the file name\location

Edit:

trying to get a project relative folder I moved the file to \content\photofolder and did this:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/3/f/33f88029840ae65d07319d6943bdcae92e5542c1.png)

---

<div class="post-metadata">

**Author:** ![SOLDIEROSCAR](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SOLDIEROSCAR](https://forums.unrealengine.com/u/SOLDIEROSCAR)\
**Post date:** [June 27, 2024, 10:36pm UTC](https://forums.unrealengine.com/t/trying-to-import-a-png-file-from-a-local-folder-during-runtime-to-display-on-a-widget/1918491/7 "2024-06-27T22:36:59Z")

</div>

yes i didnt need the “File://” I can now have it display on the widget. Now I need to figure out how to save it so its stored into an actors variable as an image texture.

---

<div class="post-metadata">

**Author:** ![ShadowBr0kerz](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/shadowbr0kerz/32/1201558_2.png) [@ShadowBr0kerz](https://forums.unrealengine.com/u/ShadowBr0kerz)\
**Post date:** [October 19, 2026, 3:56pm UTC](https://forums.unrealengine.com/t/trying-to-import-a-png-file-from-a-local-folder-during-runtime-to-display-on-a-widget/1918491/8 "2026-10-19T15:56:20Z")

</div>

the File:// prefix was the killer, ImportFileAsTexture2D wants a plain OS path so dropping the prefix was the right fix. set brush from texture also skips the slate brush detour.

one heads up for later: the IDesktopPlatform file dialog in your first screenshot is editor-only and dies in packaged builds. so keep the picker and the loader as separate steps, picker returns a path string, loader turns it into a texture.

async runtime file dialog from fab is the packaged-safe picker i use for this, one blueprint node with on selected and on cancelled, then the same import node chain you already have.
