Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

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

New Here ,
Dec 09, 2020 Dec 09, 2020

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.jpgexpand image

 

My project layer composition will look like this:

Unbenannt-1.jpgexpand image

 

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
2.3K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Community Expert ,
Dec 09, 2020 Dec 09, 2020

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

JJMack
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 09, 2020 Dec 09, 2020

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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 09, 2020 Dec 09, 2020

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
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 09, 2020 Dec 09, 2020

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

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 09, 2020 Dec 09, 2020

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
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 10, 2020 Dec 10, 2020

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 10, 2020 Dec 10, 2020

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

JJMack
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 10, 2020 Dec 10, 2020

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 😉

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 10, 2020 Dec 10, 2020
LATEST

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
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines