RICH TEXT BLOCK: How I can scale the Inline Image?

I’m trying to scale the inline image with “Stretch” (a.k.a. Scale?) but I always end up with this:


Yes I set things up properly and compiled. Just what am I missing and/or what am I doing wrong?

1 Like

Did you try with a Scale box or Size Box after the Overlay wrapping your rich text ?

Did that. I know, Fill the Scale Box Horizontally and Vertically after the Size Box slot:


But I’m trying to scale the Inline Image THROUGH the Rich Text Block. But the “Stretch” doesn’t work.

Do I have to create my own modified Rich Text Block (as a plugin), to be able to do that? And where can I find it?

I see, you should be able to add parameters same as html img with width and height.

Tried again with width="1.75" and height="1.75". No changes.
The inline image keeps its size: 54 x 54. What could cause this?

Try width="94" and height="94"

1 Like

For future reference, “stretch” expects an enum, not a float:

UENUM(BlueprintType)
namespace EStretch
{
	enum Type : int
	{
		/** Does not scale the content. */
		None,
		/** Scales the content non-uniformly filling the entire space of the area. */
		Fill,
		/**
		 * Scales the content uniformly (preserving aspect ratio) 
		 * until it can no longer scale the content without clipping it.
		 */
		ScaleToFit,
		/**
		 * Scales the content uniformly (preserving aspect ratio) 
		 * until it can no longer scale the content without clipping it along the x-axis, 
		 * the y-axis can/will be clipped.
		 */
		ScaleToFitX,
		/**
		 * Scales the content uniformly (preserving aspect ratio) 
		 * until it can no longer scale the content without clipping it along the y-axis, 
		 * the x-axis can/will be clipped.
		 */
		ScaleToFitY,
		/**
		 * Scales the content uniformly (preserving aspect ratio), until all sides meet 
		 * or exceed the size of the area.  Will result in clipping the longer side.
		 */
		ScaleToFill,
		/** Scales the content according to the size of the safe zone currently applied to the viewport. */
		ScaleBySafeZone,
		/** Scales the content by the scale specified by the user. */
		UserSpecified,
		/** Scales the content by the scale specified by the user and also clips. */
		UserSpecifiedWithClipping
	};
}

Example usage:

<img id="some_img_id" width="1024" height="1024" stretch="ScaleToFit"/>

If you are storing this in CSV format for use with a string table (for localization, etc), escape the quotes like:

<img id=\""some_img_id\"" width=\""1024\"" height=\""1024\"" stretch=\""ScaleToFit\""/>

@robertanthony02 Please, where did you find this? Thank you!