How can I get the Auto Size values of a child widget in a Horizontal Box?

So what I’m trying to do is to correctly scale an image to a child in a horizontal box.

Now the child I add is auto scaled correctly to the box to its parent, but the image in the child does not scale to the box. So my only thought was to set the scale of the image before adding the child.

However, I can’t find any functions that would allow me to access the size of a child in a horizontal. Hence I’m stuck.

I’ve attached some images to try and explain it better.