# Adding PNG thumbnail for custom asset

**URL:** <https://forums.unrealengine.com/t/adding-png-thumbnail-for-custom-asset/2322405>\
**Category:** Plugins\
**Tags:** unreal-engine, editor, question, CPP\
**Created:** [February 8, 2025, 2:16am UTC](https://forums.unrealengine.com/t/adding-png-thumbnail-for-custom-asset/2322405 "2025-02-08T02:16:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ResetBR](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/resetbr/32/1019304_2.png) [@ResetBR](https://forums.unrealengine.com/u/ResetBR)\
**Post date:** [February 8, 2025, 2:16am UTC](https://forums.unrealengine.com/t/adding-png-thumbnail-for-custom-asset/2322405/1 "2025-02-08T02:16:52Z")

</div>

I’m having trouble changing the default image of my custom asset. Essentially, there are 3 classes involved: ` **UDataAsset** ` (which is the asset I want to change the image for), ` **UDataAssetFactory** ` (which defines the drag and drop behavior in the editor and manages the allowed file types), and ` **IAssetTypeActions** ` (which is responsible for modifying these properties, including the thumbnail). This is the function that creates the brush during startup.

 ![Screenshot_3](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/5/8/a580b49fc1d86a9542d50ec21b4202ee6408552b.png)

And this is the part that should change the thumbnail in the IAssetTypeAction:

 ![Screenshot_4](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/0/b/70b63b6fc08519b15eb831155ade3358cfc17459.png)

It does change the file, but there were two cases where a checkerboard pattern appeared along with the error:  
_LogSlateStyle: Warning: Missing Resource from ‘BridgeStyle’ Style: ‘Unable to find Brush ‘MidiEssenceStyle.MidiAsset.Icon’.’_

![Screenshot_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/0/b/90bc8c92eed3ccea3faf7a8e5b48b2a21e26b4ae.png)

 ![Screenshot_2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/0/4/c04725d1aa8e464cb691e0175fd47f89a76b8270.png)

I’m using the default Icon128 image for testing. Thanks in advance!

---

<div class="post-metadata">

**Author:** ![ResetBR](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/resetbr/32/1019304_2.png) [@ResetBR](https://forums.unrealengine.com/u/ResetBR)\
**Post date:** [February 8, 2025, 9:12pm UTC](https://forums.unrealengine.com/t/adding-png-thumbnail-for-custom-asset/2322405/2 "2025-02-08T21:12:12Z")

</div>

I finally made it… In case anyone goes through the same thing, I swapped IAssetTypeAction with UAssetDefinitionDefault because, from what I saw, IAsset is for versions prior to 5.1. I don’t think that was the reason, but anyway, I created a file to manage the style, and then you just go to the module and call the Initialize() function of that class in the StartupModule.  
[MidiStyle.cpp](https://forums.unrealengine.com/uploads/short-url/g8LchExUyYbjsQJoW5vkX8UG9ys.cpp) (1.1 KB)  
[MidiStyle.h](https://forums.unrealengine.com/uploads/short-url/7bLI2GXsSfpcdkOyTVo7q8ICVti.h) (515 Bytes)

Probably I was managing the path incorrectly as well… In the UAssetDefinition, I overrode the GetThumbnailBrush() function.

virtual const FSlateBrush\* GetThumbnailBrush(const FAssetData& InAssetData, const FName InClassName) const override  
{  
return FSlateStyleRegistry::FindSlateStyle(“MidiStyle”)-\>GetBrush(“MidiEssence.MidiAsset”);  
}

---

<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:** [March 10, 2025, 9:12pm UTC](https://forums.unrealengine.com/t/adding-png-thumbnail-for-custom-asset/2322405/3 "2025-03-10T21:12:18Z")

</div>

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