Batch replace linked images, change text layer according to CSV source and saving with specific name

New Here ,
Dec 09, 2020

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:

Unbenannt-2.jpg

 

My project layer composition will look like this:

Unbenannt-1.jpg

 

My goal is:

  1. Replace linked file with files from specific folder
  2. Replace "Title" text layer content with data from specific CSV file
  3. 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

TOPICS
Actions and scripting, How to, Import and export

Views

102

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Batch replace linked images, change text layer according to CSV source and saving with specific name

New Here ,
Dec 09, 2020

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:

Unbenannt-2.jpg

 

My project layer composition will look like this:

Unbenannt-1.jpg

 

My goal is:

  1. Replace linked file with files from specific folder
  2. Replace "Title" text layer content with data from specific CSV file
  3. 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

TOPICS
Actions and scripting, How to, Import and export

Views

103

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Dec 09, 2020 0
Most Valuable Participant ,
Dec 09, 2020

Copy link to clipboard

Copied

Look for tutorials on Photoshop Data Driven Graphics  using templates with variables.

JJMack

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 09, 2020 0
New Here ,
Dec 09, 2020

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?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 09, 2020 0
Most Valuable Participant ,
Dec 09, 2020

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.

JJMack

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 09, 2020 0
New Here ,
Dec 09, 2020

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:

 

  1. Change the "Title" text layer with data from one specific csv file
  2. Change the "Linked file" smart object layer with other images from a specific folder
  3. 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

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 09, 2020 0
Most Valuable Participant ,
Dec 09, 2020

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.

JJMack

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 09, 2020 0
New Here ,
Dec 10, 2020

Copy link to clipboard

Copied

Is there any other way to edit 100+ images and change text for 5 languages?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 10, 2020 0
Most Valuable Participant ,
Dec 10, 2020

Copy link to clipboard

Copied

Other than which way with different languages do all languages use the same character set and  text orientation

JJMack

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 10, 2020 0
Adobe Community Professional ,
Dec 10, 2020

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 😉

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 10, 2020 0
JJMack LATEST
Most Valuable Participant ,
Dec 10, 2020

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.

JJMack

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 10, 2020 1