I’m using UXP to build plugin. It downloads image from given URL, then save it locally on user’s machine and then place into photoshop/indesign document.
And I need to implement new feature, fit this image into selected frame if it exists. For InDesign it works perfect
But for Photoshop it’s nightmare. I didn’t find any similar method for fitting image inside selected frame, I’ve tried with uxp, photoshop scripts and batchPlay, nothing works. Is anyone here able to help me with this?
Hey!
Yes, that’s right. This is a screenshot of plugin. When I click on download icon flow I described above happens. And I want to place image inside of this selected frame. But I couldn’t find how. I will be very grateful for any help here.
Yes, that’s true. And for me it’s super weird that for InDesign only two rows of code needed. And also it’s possible to do with old approach of building extensions with CEP and Extendscript. And with UXP it’s not.
There is probably no DOM API but you should be successfull with batchPlay. The command you probably need to use is File > Place Linked or File > Place Embedded. Depends on what you need.
Hey, thanks for your response. Could you please help me with this line "_path": image-to-place,
What should be in image-to-place? What object is it? or it’s just a path to image or what?