How to Create Variable Data Graphics in Photoshop
Photoshop’s native Data-Driven Graphics feature allows designers to automate the production of hundreds of personalized marketing graphics using a single base template and an external data file. By linking layer properties to variables defined in a spreadsheet, you can automatically swap out text, toggle layer visibility, and replace images across multiple records. This article explains the end-to-end workflow: formatting your spreadsheet, configuring Photoshop variables, importing data sets, and exporting the final batch files.
1. Set Up the Photoshop Template
Create your design layout in Adobe Photoshop. Ensure every element
that will change—such as a customer name, a promotional offer, or a
product photograph—is on its own distinct layer. Name these layers
clearly in the Layers panel (for example, ClientName,
DiscountCode, or ProductImage), as these layer
names will correspond directly to your data fields.
2. Prepare the Data Source
Use a spreadsheet program such as Microsoft Excel or Google Sheets to organize the personalized information.
- The first row must contain the column headers, which will serve as your variable names.
- Subsequent rows represent individual records (data sets) for each personalized graphic.
- For dynamic images, list the absolute or relative file path to the
image asset stored on your computer (for example,
images/product1.png). - Once populated, export the spreadsheet as a comma-separated values
(
.csv) or tab-delimited text (.txt) file.
3. Define Variables in Photoshop
With your PSD open, navigate to Image > Variables > Define. Select a target layer from the drop-down menu and choose one or more variable types:
- Visibility: Shows or hides the layer based on true/false values.
- Pixel Replacement: Replaces the image pixels on that layer with external image files. Choose how the new image scales (e.g., Fit, Fill, or Conforming).
- Text Replacement: Replaces the text on a type layer with text from the data source.
Enter the exact column header name from your spreadsheet into the Name field for each corresponding layer.
4. Import the Data Sets
Switch to the Data Sets panel within the Variables
window (or select Image > Variables > Data Sets).
Click the Import button, browse to your saved
.csv or .txt file, set the encoding to UTF-8
to prevent character formatting issues, and click OK.
Photoshop imports each row as a distinct data set. You can preview
individual records using the navigation arrows to confirm that text
aligns correctly and images load properly.
5. Export the Personalized Graphics
To generate the final graphics:
- Navigate to File > Export > Data Sets as Files.
- Select an output folder on your computer.
- Configure the file naming conventions using data set names, sequential numbers, or document names.
- Click OK to run the batch process.
Photoshop will generate a unique .psd file for every
record in your data set. If you need standard web formats such as
.jpg or .png, open File > Scripts
> Image Processor, select the output folder containing your
generated PSDs, and convert the entire batch into your desired image
format automatically.