Is there a way?
We have the Image element for this but the UIBuilder does not currently support this element. You’d have to add it in code. You can use a dummy VisualElement in the UIBuilder to mark where the Image element should go and then it should be pretty easy to swap it in C#. This is a temporary issue.
But I’d encourage you to try not using auto-sizing elements for your images. It means that some of your layout is not described in USS but instead it comes from a random file. If you resave your image with a different size, you can break your UI’s layout without knowing. It’s usually better to have the UI drive the size of the images it uses. But I say this without knowing your exact use case. ![]()
@uDamian Any plans as to when the Image element will be visible in the UI Builder? I basically use it to check which elements exist and can be used even if I’m building the UI in code.