Photoshop UXP Plugin — Images Place on Frames but Not Fitting Correctly
Hi everyone,
I’m building a Photoshop UXP plugin using React that automatically places selected photos into selected PSD frame layers.
Here’s what’s happening right now:
When I select 1 or more frame layers and then select photos,
The plugin places the images on top of the selected frames (so layer targeting works),
But they aren’t fitting inside the frame bounds properly — they appear too large or off-center.
I think the clipping mask and transform logic is not being applied correctly after placement.
Here’s what I want:
Each selected photo should fit exactly inside the corresponding frame’s bounding box — similar to how “Place Embedded” with “Clipping Mask” behaves in Photoshop manually.
I’m using batchPlay for placement and transformation.
If anyone can share a working snippet or guide me on the correct sequence of actions (create smart object → transform → set clipping mask), that would be super helpful.
Thanks in advance! 🙏
— Vijay
