Images And Text From CSV
Script for Adobe Photoshop
Latest update 10/12/2021, version 1.2
The script reads CSV spreadsheet data for image file names and text, searches a selected folder for the images, then merges each image with its text and saves an output file.
- Combine image and text for personalized images
- An easier way to accomplish data merge in Photoshop
- Process any number of images
How to use the script
Before using the script, some preparation is needed.
First is a master image with a layer named “image”, and a text layer named “text”.
These two layers are the minimum required. There may be other layers or layer groups, a logo for example, or anything to include on all images output.
For each image processed, the image layer is replaced by the input image, which is scaled to match the master image size, cropping as needed to maintain proportions. The text layer’s contents are replaced by the text in the spreadsheet data. The text layer may have effects. The layer itself is not replaced, only its textual contents.
The second item to prepare is a spreadsheet of at least two columns and any number of rows. The minimum columns are one for “image”, and another for “text”. The column heads must be precisely these values. Any columns with other labels, or columns beyond the two required, are ignored.
Rows of the column image are the file names of images. The full path is not necessary. The folder selected next is the location to search for the files. Rows of the column text are the literal contents applied to the layer named “text” of the master image.
Save the spreadsheet as Comma Separated Values (CSV).
With the master image open, run the script.
The interface has three sections: Data file (CSV), Images folder, and Output. Select the data file, the images folder, and the output folder. Enable the desired options, and click the OK button to begin. If any problems occur, a log file is written at the location of the data file.
Section 1: Data file (CSV)
File — select the CSV data file.
Section 2: Images folder
Folder — select the folder of images to process. For images found in the folder that appear in the image column of the data, the image is processed.
Section 3: Output
Folder — click to select the location where images are output.
Format — the file format output. Select JPG, PNG, PSD, or TIF.
Name — choose to use either the input image file name, or the text column to name output files.
Convert to profile — converts color to the selected profile prior to output. Note that PNG format is always converted to sRGB web standard and the option to select otherwise is disabled.
TIP: Converting to another profile is primarily to make CMYK separations for print, which of course is functionality the script provides. But as well, this option can convert duotones to RGB or CMYK, or convert these and other color spaces to grayscale (use the profile Dot Gain 20%).
Flatten — result is a single “Background” layer. JPG always performs this step.
Quality — applies to JPEG images. Valid range is from 0 to 12. 0 is extreme compression resulting in low quality. 12 is light compression that is virtually indistinguishable from the original, the highest possible quality, which of course, results in the largest file size. 10 to 12 is recommended for print or other high-quality reproduction. For web images, 5 to 8 is an acceptable range.
Embed color profile — applies to JPEG images. Embeds into the JPG the current color profile, either for the original color space if not converted, or the profile selected for the Convert to profile option. The option exists for JPG so that files intended for print can include profiles, important to preserve in that case, but JPG for web may omit profiles, as the profile is excess and only increases file size.
PSD and TIF always embed profiles, and PNG never embeds profiles.
Save working file (PSD) — keeps an un-flattened version of the output file for later adjustment, if needed.
Folder — click to select the location where working files are saved.
Images And Text From CSV
License details included in download
For help installing scripts, see How to Install and Use Scripts in Adobe Creative Cloud Applications.
IMPORTANT: by downloading the script you agree that the software is provided without any warranty, express or implied. USE AT YOUR OWN RISK. Always make backups of important data.