Skip to main content
Participating Frequently
July 3, 2020
Question

Batch replacement of smart object in laptop mockup.

  • July 3, 2020
  • 1 reply
  • 2733 views

Hey 

I have laptop mockup and almost 10,000 images and i want to put every single pic in mockup and save it as png. or jpg but i cant to do it one by one as it take a ages to do.So if anyone know any script which can work like that please answer me,it will be a great help..

Thank you

This topic has been closed for replies.

1 reply

JJMack
Community Expert
Community Expert
July 3, 2020

My Free Photoshop Photo Collage and Mockup Toolkit  Saves jpeg files for populated mockups and can optionally save a PSD layered version.  There is no png option.  The scripts are text .JSX files you could easily add png saving. To populate 10,000 images the script run time will be long.  Have a good bottle of wine to enjoy as you watch the script perform it deed.  Your laptop need freespace for Photoshop's scratch and 10,000 new jpeg files.

JJMack
Itach__iAuthor
Participating Frequently
July 7, 2020

Hey 

Thanks for your help,but i already know about your toolkit but i dont know how to use it.It will be a great help if you provide me some tutorial.you can mail me"shivamnegi896@gmail.com"

JJMack
Community Expert
Community Expert
September 8, 2020

Hi JJMack,
your script "BatchMockupTemplates.jsx" works really well when everything is set according to the 4 rules, thanks!!! ... but that first layer on top rule creates me problem because in the mockup there are often shadow layers and or other ones that really need to stay on top! of the smart object to be replaced!
Do you have any solution for this?
It could be for example just the 5th layer (smart object) / the "N" one to be replaced!
Eventually also by name! The script replace the layer (smartobject) named "picturetobereplaced"... or even simply the 1st smart object the script finds...
There must be a way! 😉
Thanks so much if you can help!!!


A very simple one. Its the a simple to populate design for my scripts to populate.

 

Let say your mockup is very complex and  you have many Smart object layer scattered throughout your layers stack with adjustment layers, overlay layers, smart filters etc.  Wow complex. 

 

Easy fix  target all the layers and layer groups  and use the menu Layer>New>Group from Layers... name that group Mockup.  Now with the layer stack fully expanded scan the layers and find the smart object layers you want  repopulated. Each time you find one target it and do a Crtl+J copy and drag the copy out the mockup group to the top of the layer stack. 

 

When you have all the copies on top of the stack. Set their opacity  and fill to 0 and turn their visibility off. You may want to color the layer green. Make sure the stack matches your replacement queues obj0, obj1, ...., objN. These none visible layers will have their objects replace.  The layers in the Mockup group that share the layers object contents will be visible.     

 

I create my Mockup templates  starting with the smart object layer on top, I immediately duplicate it and drag the dupe into the group where I then transform, warp, mask filter and adjust the object for its use in the mockup group.

 

Its the simple to populated Mockup design.  Its rule number 1..... and it is simply easy to comply with......

JJMack