Batch replace linked images, change text layer according to CSV source and saving with specific name
Copy link to clipboard
Copied
Hi everybody,
my problem is changing text on a lot of existing files.
I have 100+ of files that look similar to this one:
My project layer composition will look like this:
My goal is:
- Replace linked file with files from specific folder
- Replace "Title" text layer content with data from specific CSV file
- Save as JPG with the same name as the linked file to an output folder
Is it possible to do every step at once?
Thank you,
Nam
Explore related tutorials & articles
Copy link to clipboard
Copied
Look for tutorials on Photoshop Data Driven Graphics using templates with variables.
Copy link to clipboard
Copied
Thanks JJ,
As far as I understand, there is a need for scripting if I want to use and replace linked layers? I understand you can manipulate text contents through variables, but image layers can only be modified as pixels, or am I mistaken?
Copy link to clipboard
Copied
Link layer or linked smart objects. Smart Object layer can not be variable layers that get replacement they would not be used in data driven graphics only their visibility could be changed with data driven graphics. I would think text layer and and image layer that are linked can be variables layers. I have not used Photoshop data driven graphics and I have never come across a script that repopulate templates that have smart object layer that have linked link objects in the template that need replacement content. That does not make sense for you want to repopulate the layers with different content and save jpeg for the web. Jpeg do not have layers. What value would replacing linked smart object file content add to the mix.
Copy link to clipboard
Copied
Linked smart objects. And yes, I am aware that linked smart objects can not be modified via variables. That is why I was hoping to get some help setting up an appropiate script.
I am not only replacing the image layers, but also the "Title" text layer. As I described in my initial post, the goal is to do three different things with one script:
- Change the "Title" text layer with data from one specific csv file
- Change the "Linked file" smart object layer with other images from a specific folder
- Save the result as new jpg at a different location but with the same file name as the source jpg of the smart object layer.
CSV file:
text1
text2
text3
images folder
image1
image2
image3
output images:
image1 with text1 title
image2 with text2 title
image3 with text3 title
Copy link to clipboard
Copied
To me using smart object layers with links object file add complexity and adds no value it will just hinder performances and make programs the process harder. Templates should have enbedded opjects. Text is also hard to deal with for font size depends on document size and resolution and quantity of characters. Text seem to be based on points which is basically is a resolution 72ppi. If you do not have a strong Programming background and do not know javascript well. You are facing an up hill road. Adobe Photoshop DOM does not cover all of Photoshop feature so you often have to use Action Manager code to script functions for Photoshop scripts. You will need to learn to program action manager code. Are you ready to climb K2 its a high mountain to concur.
Copy link to clipboard
Copied
Is there any other way to edit 100+ images and change text for 5 languages?
Copy link to clipboard
Copied
Other than which way with different languages do all languages use the same character set and text orientation
Copy link to clipboard
Copied
Make a loop over CSV rows or files to be loaded into smart object, so during each iteration the text layer will be edited to get another CSV row content, and then Smart Object is going to be relinked to another file of specific folder. Of course before loop will be continued the current state of your PSD document will be saved as JPG in chosen earlier location with name of taken file. It is very simple task for someone with 10 minutes of time 😉
Copy link to clipboard
Copied
It is very simple task for someone with 10 minutes of time when that someone knows javascript, Photoshop, and Photoshop scripting as well as your do and they can type. For other it will require more time.
I would have a very hard time dealing with language character sets and vertical and horizontal text.

