user35387: I have a shape that varies in height, and an image that varies in height.
I would like the image height to be the same height as the shape at all times.
I got as far as this, but none of my math seems to be making the image the same height as the bar constantly.
kyronnb = thisComp.layer("Kyron BG").sourceRectAtTime();

syz = 100 * thisLayer.height/thisComp.height - 100; 
kper = 100 * kyronnb.height/thisComp.height;

sizeW = kper - syz;

[sizeW, sizeW]


user29988: I assume "Kyron BG" is the shape layer and thisLayer is the image layer and you're applying the expression on the scaling of the image layer. Then this should work:
kyronnb = thisComp.layer("Kyron BG").sourceRectAtTime();
scaleFactor = kyronnb.height/thisLayer.height*100;
[scaleFactor, scaleFactor]


35387: <p>I have a shape that varies in height, and an image that varies in height.</p>
<p>I would like the image height to be the same height as the shape at all times.</p>
<p>I got as far as this, but none of my math seems to be making the image the same height as the bar constantly.</p>
<pre><code>kyronnb = thisComp.layer(&quot;Kyron BG&quot;).sourceRectAtTime();

syz = 100 * thisLayer.height/thisComp.height - 100; 
kper = 100 * kyronnb.height/thisComp.height;

sizeW = kper - syz;

[sizeW, sizeW]
</code></pre>
 29988: <p>I assume &quot;Kyron BG&quot; is the shape layer and thisLayer is the image layer and you're applying the expression on the scaling of the image layer. Then this should work:</p>
<pre><code>kyronnb = thisComp.layer(&quot;Kyron BG&quot;).sourceRectAtTime();
scaleFactor = kyronnb.height/thisLayer.height*100;
[scaleFactor, scaleFactor]
</code></pre>
