UMG Rich Text Block - Ability to enlarge inline image past the Default font size

Currently, inline images in a Rich Text Block will scale but only as large as the current font size. So I try to change the font size where the image is (in order to get the image larger), but you can’t wrap <img id=“id”/> with another style, because the image doesn’t get picked up. I also tried using a size box to override the height for the rich text block but it remains small.

As a workaround, currently I set the “Default” rich text style to the size that I want my inline images, and then apply a different (smaller) font style to the text either side of the image. It’s ok because most of my inline images are the same size. But it would be great if you could just use your default style for your text, then adjust your image size separately.

If we could go:


This is some default style text<ImgSize><img id="id"/></> and this is some more text

Then we could use styles to set maximum sizes for an inline image.

edit: actually nesting styles in general would be great. sounds hard though…

I want to second this, as i just ran into the same problem.

Yes, travel in this forum to find a solution

Any update on this ? Would be really cool to be able to nest styles.

Seconded as well. Or at the very least a way to scale the image using an inline parameter
something like <img id="id" size="128,128"/>

Having the image the exact same size of the font isn’t visually appealing in my context.

anything new on this ?

Hey, for anyone looking for this in the future, I accidentally discovered that we could enlarge the inline image by specifying the width and height for the img element.

For example: Some text <img id="ImageID" height="64"/> more text. This will increase the inline image height to 64 pixels (or whatever unit the UMG uses), i.e. enlarge it.

The width and height parameters are not mentioned in the documentation at all so I found out just by purely guessing after seeing @axelkomair01’s reply.

P/S: I’m using Unreal Engine 5.1 on Linux (Kubuntu 22.04)

8 Likes

The `width` and `height` parameters are not mentioned in the [documentation ](https://docs.unrealengine.com/5.0/en-US/umg-rich-text-blocks-in-unreal-engine/#decoratorclasses) at all so I found out just by purely guessing after seeing @axelkomair01’s reply.

@ congthuan This is insane, and you are a lifesaver. Have you found any more of these parameters since?

Glad it helped.

There’s a few more of these parameters for the img. You can look at the source code here (Note: Access permission to the Unreal Engine source code is needed to access this link).

2 Likes