Create data-driven graphics

Last updated on Oct 4, 2026

Use variables and data sets to generate multiple versions of a template with different text and images.

Data-driven graphics let you produce multiple image variations from a single template by defining which elements change and supplying the replacement content through data sets.

This workflow applies when you need to generate multiple versions of a design with varying text, images, or layer visibility, such as web banners for various products, personalized certificates, or localized marketing materials. Your template must use separate layers for each element you want to vary. For importing data sets from external text files, see the related article on data set import.

Photoshop supports three variable types that control various aspects of your template. Visibility variables control whether layer content is visible. Text Replacement variables substitute strings in type layers. Pixel Replacement variables swap layer pixels with content from image files. You can apply multiple variable types to a single template and link multiple layers to the same variable for coordinated changes.

Define variables for template elements

Select Image > Variables > Define.

Choose the layer containing content you want to vary from the Layer menu.

Select one or more variable types: Visibility, Text Replacement, or Pixel Replacement.

Enter a name in the Name field using letters, underscores, colons, periods, or hyphens without spaces.

Choose a scaling method (Fit, Fill, As Is, or Conform), for Pixel Replacement variables.

Select an alignment position and check Clip To Bounding Box.

Repeat for additional layers, then select OK.

Layers containing variables display an asterisk next to their name in the dialog. To rename a variable, return to Image > Variables > Define, select the layer, and enter a new name in the Name field. To link multiple layers to the same variable, choose an existing variable name from the Name dropdown menu when defining variables for additional layers.

Create and manage data sets

Select Image > Variables > Data Sets.

Select the new data set icon to create a data set based on current values.

Choose a variable from the Name menu.

Edit the variable data:

  • For Visibility variables: Select Visible or Invisible
  • For Pixel Replacement variables: Select File and choose the replacement image
  • For Text Replacement variables: Enter text in the Value field.

Repeat for each variable in the data set.

Create additional data sets for each design variation you need.

Select OK when finished.

Preview how each data set affects your design by navigating to Image > Apply Data Set, choosing a data set from the list, and selecting Apply. You can also check the Preview checkbox in the Data Sets dialog to see changes without closing the dialog.

Use the arrow icons in the Data Sets dialog to move between data sets. To modify an existing data set, select it from the Data Set menu and edit the variable values. To delete a data set, select it and choose the delete icon.

Generate output files from data sets

Select File > Export > Data Sets As Files.

Enter a base name for the generated files in the naming field.

Select Folder and choose a destination directory.

Choose which data sets to export from the list.

Select OK to generate the files.

Photoshop creates separate PSD files for each data set, combining your base name with the data set name. Each file contains the template with the data set's values applied.

Applying a data set directly to your template (Image > Apply Data Set) overwrites the original document. Always work on a copy or export data sets as files instead.