Common Attributes +
Value - a multiplier.
Input Path - connect a Shape with a Material to sample from.
Graph - use the graph to remap the output values.
Offset - add/subtract a value to the output(s).
Import an image. to the Assets Window.
Drag the image into the Scene Window (this will create a Footage Shape).
Create a Material Sampler.
Connect footageShape.id > materialSampler.inputPath.
Create a Rectangle
With the Rectangle selected, alt/option + click the Duplicator Shelf item.
Connect materialSampler.id > duplicator.shapeScale.
The shapes will be scaled dependent on the image.
The Material Sampler does not currently support frame changes when used within a Pre Comp. Please try and use a Group instead of a Composition if possible as a workaround.