# Set Image Widget image using a path string to a texture asset in blueprints

**URL:** <https://forums.unrealengine.com/t/set-image-widget-image-using-a-path-string-to-a-texture-asset-in-blueprints/2238184>\
**Category:** Blueprint\
**Tags:** image, unreal-engine, UI, Widget, Blueprint, question\
**Created:** [December 23, 2024, 7:35am UTC](https://forums.unrealengine.com/t/set-image-widget-image-using-a-path-string-to-a-texture-asset-in-blueprints/2238184 "2024-12-23T07:35:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jangles1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Jangles1](https://forums.unrealengine.com/u/Jangles1)\
**Post date:** [December 23, 2024, 7:35am UTC](https://forums.unrealengine.com/t/set-image-widget-image-using-a-path-string-to-a-texture-asset-in-blueprints/2238184/1 "2024-12-23T07:35:11Z")

</div>

Given that I know the path to a texture asset, how can I set that texture to an image widget using blueprints? I have quite a few images that this could be, so I didn’t want to setup some kind of massive switch, but I am able to construct the path string for the correct texture.

I assume I have to set the brush on the image widget, but I don’t know how to use the path string to retrieve the given asset and turn it into a brush.

**EDIT**

Ok the Asset Registry doesn’t work when packaged or in standalone. But the data table idea did work from @Arodi007 For anyone interested in how this looks. Here’s what did.

I created a struct that held my info that I want to look up.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/5/5/e55efab85b6005aa115d8a9b4a0e12238a2db27f.png)

Then I created a Data Table using that struct and added rows. The row name is the string which you will construct to lookup the necessary image.

Then I used the table to get the icon and assign it as a brush texture to my image

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/e/f/cefe3a49011e4f598d607f3b8ea1b3e62713f011.png)

---

<div class="post-metadata">

**Author:** ![Arodi007](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/arodi007/32/1022275_2.png) [@Arodi007](https://forums.unrealengine.com/u/Arodi007)\
**Post date:** [December 23, 2024, 9:49am UTC](https://forums.unrealengine.com/t/set-image-widget-image-using-a-path-string-to-a-texture-asset-in-blueprints/2238184/2 "2024-12-23T09:49:17Z")

</div>

You can try this way with Asset Registry.  
⚠ Important: Just make sure it working on package/ship version as well.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/2/7/f27a41f74be8aa90a6758ddbd6d5f671b17d316a.png)

Otherwise you can use data table with soft ref textures list or with data asset.

---

<div class="post-metadata">

**Author:** ![Jangles1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Jangles1](https://forums.unrealengine.com/u/Jangles1)\
**Post date:** [December 23, 2024, 5:57pm UTC](https://forums.unrealengine.com/t/set-image-widget-image-using-a-path-string-to-a-texture-asset-in-blueprints/2238184/3 "2024-12-23T17:57:32Z")

</div>

I’ll give that a try. I read somewhere that the Asset Registry doesn’t work when packaged, so we’ll see. I had thought about doing some kind of data table.

What I’m truly trying to do is display a key mapping icon, but not dependent on the device you’re currently using. So I have some CommonInputBaseControllerData setup that maps out those key/icon relationships. do you know how I might access those given that I know the key I’m looking for?

---

<div class="post-metadata">

**Author:** ![Jangles1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Jangles1](https://forums.unrealengine.com/u/Jangles1)\
**Post date:** [December 23, 2024, 11:49pm UTC](https://forums.unrealengine.com/t/set-image-widget-image-using-a-path-string-to-a-texture-asset-in-blueprints/2238184/4 "2024-12-23T23:49:18Z")

</div>

Ok the Asset Registry doesn’t work when packaged or in standalone. But the data table idea did work from @Arodi007 For anyone interested in how this looks. Here’s what did.

I created a struct that held my info that I want to look up.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/5/5/e55efab85b6005aa115d8a9b4a0e12238a2db27f.png)

Then I created a Data Table using that struct and added rows. The row name is the string which you will construct to lookup the necessary image.

Then I used the table to get the icon and assign it as a brush texture to my image

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/e/f/cefe3a49011e4f598d607f3b8ea1b3e62713f011.png)

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [January 22, 2025, 11:50pm UTC](https://forums.unrealengine.com/t/set-image-widget-image-using-a-path-string-to-a-texture-asset-in-blueprints/2238184/5 "2025-01-22T23:50:17Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
