# How to load texture file and apply to button image during runtime dynamically?

**URL:** <https://forums.unrealengine.com/t/how-to-load-texture-file-and-apply-to-button-image-during-runtime-dynamically/664423>\
**Category:** Blueprint\
**Tags:** unreal-engine, UE5-0, Widget, Blueprint, question\
**Created:** [October 7, 2022, 3:37pm UTC](https://forums.unrealengine.com/t/how-to-load-texture-file-and-apply-to-button-image-during-runtime-dynamically/664423 "2022-10-07T15:37:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![genesis.block](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@genesis.block](https://forums.unrealengine.com/u/genesis.block)\
**Post date:** [October 7, 2022, 3:37pm UTC](https://forums.unrealengine.com/t/how-to-load-texture-file-and-apply-to-button-image-during-runtime-dynamically/664423/1 "2022-10-07T15:37:33Z")

</div>

Hello,  
I have a common button widget in which the button contains an image and during runtime I create a menu with multiple buttons where i update each button image dynamically during runtime through their file name.

The issue that im facing currently is when I pass the texture file name to update the image in button, it doesn’t update or load the texture dynamically during run time.  
But when I choose the same texture file from the dropdown menu for button image in widget settings it will show during the runtime.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/d/9/cd9c8476cd6c07584ea08de650fef2909ae38121.png)

if i reload that particular texture and run the game then it will show that image dynamically.

Any ideas or suggestions??  
any help would be highly appreciated 👏

---

<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:** [September 2, 2026, 7:42am UTC](https://forums.unrealengine.com/t/how-to-load-texture-file-and-apply-to-button-image-during-runtime-dynamically/664423/2 "2026-09-02T07:42:32Z")

</div>

the dropdown works cause its a cooked reference, dynamic file name needs you to load it at runtime first. LoadObject wont catch disk files.

for widget button you load external image to UTexture2D (ImportFileAsTexture2D) then make a Brush from it and SetBrush on the button image. like: Tex → MakeBrushFromTexture → SetBrush on Image widget, or set dynamic material on button.

also make sure you call it after widget constructed, not before. and use absolute path like FPaths::ProjectDir() + “ContentExternal/my.png” for testing, then later let user pick via file dialog. its not hitchy if you load async

btw runtime directory watcher from fab [Runtime Directory Watcher — Hot-Folder File Events & Async Texture Loader | Fab](https://www.fab.com/listings/98c9d662-202c-4e78-aeb7-dbf52e7d6935) worked for me
