User Guide Cancel

Create data-driven graphics

  1. Photoshop User Guide
  2. Introduction to Photoshop
    1. Dream it. Make it.
    2. What's new in Photoshop
    3. Edit your first photo
    4. Create documents
    5. Photoshop | Common Questions
    6. Photoshop system requirements
    7. Migrate presets, actions, and settings
    8. Get to know Photoshop
  3. Photoshop and other Adobe products and services
    1. Work with Illustrator artwork in Photoshop
    2. Work with Photoshop files in InDesign
    3. Substance 3D Materials for Photoshop
    4. Photoshop and Adobe Stock
    5. Use the Capture in-app extension in Photoshop
    6. Creative Cloud Libraries
    7. Creative Cloud Libraries in Photoshop
    8. Use the Touch Bar with Photoshop
    9. Grid and guides
    10. Creating actions
    11. Undo and history
  4. Photoshop on the iPad
    1. Photoshop on the iPad | Common questions
    2. Get to know the workspace
    3. System requirements | Photoshop on the iPad
    4. Create, open, and export documents
    5. Add photos
    6. Work with layers
    7. Draw and paint with brushes
    8. Make selections and add masks
    9. Retouch your composites
    10. Work with adjustment layers
    11. Adjust the tonality of your composite with Curves
    12. Apply transform operations
    13. Crop and rotate your composites
    14. Rotate, pan, zoom, and reset the canvas
    15. Work with Type layers
    16. Work with Photoshop and Lightroom
    17. Get missing fonts in Photoshop on the iPad
    18. Japanese Text in Photoshop on the iPad
    19. Manage app settings
    20. Touch shortcuts and gestures
    21. Keyboard shortcuts
    22. Edit your image size
    23. Livestream as you create in Photoshop on the iPad
    24. Correct imperfections with the Healing Brush
    25. Create brushes in Capture and use them in Photoshop
    26. Work with Camera Raw files
    27. Create and work with Smart Objects
    28. Adjust exposure in your images with Dodge and Burn
  5. Photoshop on the web beta
    1. Common questions | Photoshop on the web beta 
    2. Introduction to the workspace
    3. System requirements | Photoshop on the web beta
    4. Keyboard shortcuts | Photoshop on the web beta
    5. Supported file types | Photoshop on the web beta
    6. Open and work with cloud documents
    7. Apply limited edits to your cloud documents
    8. Collaborate with stakeholders
  6. Cloud documents
    1. Photoshop cloud documents | Common questions
    2. Photoshop cloud documents | Workflow questions
    3. Manage and work with cloud documents in Photoshop
    4. Upgrade cloud storage for Photoshop
    5. Unable to create or save a cloud document
    6. Solve Photoshop cloud document errors
    7. Collect cloud document sync logs
    8. Share access and edit your cloud documents
    9. Share files and comment in-app
  7. Workspace
    1. Workspace basics
    2. Preferences
    3. Learn faster with the Photoshop Discover Panel
    4. Create documents
    5. Place files
    6. Default keyboard shortcuts
    7. Customize keyboard shortcuts
    8. Tool galleries
    9. Performance preferences
    10. Use tools
    11. Presets
    12. Grid and guides
    13. Touch gestures
    14. Use the Touch Bar with Photoshop
    15. Touch capabilities and customizable workspaces
    16. Technology previews
    17. Metadata and notes
    18. Touch capabilities and customizable workspaces
    19. Place Photoshop images in other applications
    20. Rulers
    21. Show or hide non-printing Extras
    22. Specify columns for an image
    23. Undo and history
    24. Panels and menus
    25. Position elements with snapping
    26. Position with the Ruler tool
  8. Web, screen, and app design
    1. Photoshop for design
    2. Artboards
    3. Device Preview
    4. Copy CSS from layers
    5. Slice web pages
    6. HTML options for slices
    7. Modify slice layout
    8. Work with web graphics
    9. Create web photo galleries
  9. Image and color basics
    1. How to resize images
    2. Work with raster and vector images
    3. Image size and resolution
    4. Acquire images from cameras and scanners
    5. Create, open, and import images
    6. View images
    7. Invalid JPEG Marker error | Opening images
    8. Viewing multiple images
    9. Customize color pickers and swatches
    10. High dynamic range images
    11. Match colors in your image
    12. Convert between color modes
    13. Color modes
    14. Erase parts of an image
    15. Blending modes
    16. Choose colors
    17. Customize indexed color tables
    18. Image information
    19. Distort filters are unavailable
    20. About color
    21. Color and monochrome adjustments using channels
    22. Choose colors in the Color and Swatches panels
    23. Sample
    24. Color mode or Image mode
    25. Color cast
    26. Add a conditional mode change to an action
    27. Add swatches from HTML CSS and SVG
    28. Bit depth and preferences
  10. Layers
    1. Layer basics
    2. Nondestructive editing
    3. Create and manage layers and groups
    4. Select, group, and link layers
    5. Place images into frames
    6. Layer opacity and blending
    7. Mask layers
    8. Apply Smart Filters
    9. Layer comps
    10. Move, stack, and lock layers
    11. Mask layers with vector masks
    12. Manage layers and groups
    13. Layer effects and styles
    14. Edit layer masks
    15. Extract assets
    16. Reveal layers with clipping masks
    17. Generate image assets from layers
    18. Work with Smart Objects
    19. Blending modes
    20. Combine multiple images into a group portrait
    21. Combine images with Auto-Blend Layers
    22. Align and distribute layers
    23. Copy CSS from layers
    24. Load selections from a layer or layer mask's boundaries
    25. Knockout to reveal content from other layers
  11. Selections
    1. Get started with selections
    2. Make selections in your composite
    3. Select and Mask workspace
    4. Select with the marquee tools
    5. Select with the lasso tools
    6. Adjust pixel selections
    7. Move, copy, and delete selected pixels
    8. Create a temporary quick mask
    9. Select a color range in an image
    10. Convert between paths and selection borders
    11. Channel basics
    12. Save selections and alpha channel masks
    13. Select the image areas in focus
    14. Duplicate, split, and merge channels
    15. Channel calculations
  12. Image adjustments
    1. Replace object colors
    2. Perspective warp
    3. Reduce camera shake blurring
    4. Healing brush examples
    5. Export color lookup tables
    6. Adjust image sharpness and blur
    7. Understand color adjustments
    8. Apply a Brightness/Contrast adjustment
    9. Adjust shadow and highlight detail
    10. Levels adjustment
    11. Adjust hue and saturation
    12. Adjust vibrance
    13. Adjust color saturation in image areas
    14. Make quick tonal adjustments
    15. Apply special color effects to images
    16. Enhance your image with color balance adjustments
    17. High dynamic range images
    18. View histograms and pixel values
    19. Match colors in your image
    20. Crop and straighten photos
    21. Convert a color image to black and white
    22. Adjustment and fill layers
    23. Curves adjustment
    24. Blending modes
    25. Target images for press
    26. Adjust color and tone with Levels and Curves eyedroppers
    27. Adjust HDR exposure and toning
    28. Dodge or burn image areas
    29. Make selective color adjustments
  13. Adobe Camera Raw
    1. Camera Raw system requirements
    2. What's new in Camera Raw
    3. Introduction to Camera Raw
    4. Create panoramas
    5. Supported lenses
    6. Vignette, grain, and dehaze effects in Camera Raw
    7. Default keyboard shortcuts
    8. Automatic perspective correction in Camera Raw
    9. Radial Filter in Camera Raw
    10. Manage Camera Raw settings
    11. Open, process, and save images in Camera Raw
    12. Repair images with the Enhanced Spot Removal tool in Camera Raw
    13. Rotate, crop, and adjust images
    14. Adjust color rendering in Camera Raw
    15. Process versions in Camera Raw
    16. Make local adjustments in Camera Raw
  14. Image repair and restoration
    1. Remove objects from your photos with Content-Aware Fill
    2. Content-Aware Patch and Move
    3. Retouch and repair photos
    4. Correct image distortion and noise
    5. Basic troubleshooting steps to fix most issues
  15. Image enhancement and transformation
    1. Replace sky in your images
    2. Transform objects
    3. Adjust crop, rotation, and canvas size
    4. How to crop and straighten photos
    5. Create and edit panoramic images
    6. Warp images, shapes, and paths
    7. Vanishing Point
    8. Content-aware scaling
    9. Transform images, shapes, and paths
  16. Drawing and painting
    1. Paint symmetrical patterns
    2. Draw rectangles and modify stroke options
    3. About drawing
    4. Draw and edit shapes
    5. Painting tools
    6. Create and modify brushes
    7. Blending modes
    8. Add color to paths
    9. Edit paths
    10. Paint with the Mixer Brush
    11. Brush presets
    12. Gradients
    13. Gradient interpolation
    14. Fill and stroke selections, layers, and paths
    15. Draw with the Pen tools
    16. Create patterns
    17. Generate a pattern using the Pattern Maker
    18. Manage paths
    19. Manage pattern libraries and presets
    20. Draw or paint with a graphics tablet
    21. Create textured brushes
    22. Add dynamic elements to brushes
    23. Gradient
    24. Paint stylized strokes with the Art History Brush
    25. Paint with a pattern
    26. Sync presets on multiple devices
  17. Text
    1. Add and edit the text
    2. Unified Text Engine
    3. Work with OpenType SVG fonts
    4. Format characters
    5. Format paragraphs
    6. How to create type effects
    7. Edit text
    8. Line and character spacing
    9. Arabic and Hebrew type
    10. Fonts
    11. Troubleshoot fonts
    12. Asian type
    13. Create type
  18. Filters and effects
    1. Use the Liquify filter
    2. Use the Blur Gallery
    3. Filter basics
    4. Filter effects reference
    5. Add Lighting Effects
    6. Use the Adaptive Wide Angle filter
    7. Use the Oil Paint filter
    8. Use the Liquify filter
    9. Layer effects and styles
    10. Apply specific filters
    11. Smudge image areas
  19. Saving and exporting
    1. Save your files in Photoshop
    2. Export your files in Photoshop
    3. Supported file formats
    4. Save files in graphics formats
    5. Move designs between Photoshop and Illustrator
    6. Save and export video and animations
    7. Save PDF files
    8. Digimarc copyright protection
  20. Color Management
    1. Understanding color management
    2. Keeping colors consistent
    3. Color settings
    4. Duotones
    5. Work with color profiles
    6. Color-managing documents for online viewing
    7. Color-managing documents when printing
    8. Color-managing imported images
    9. Proofing colors
  21. Web, screen, and app design
    1. Photoshop for design
    2. Artboards
    3. Device Preview
    4. Copy CSS from layers
    5. Slice web pages
    6. HTML options for slices
    7. Modify slice layout
    8. Work with web graphics
    9. Create web photo galleries
  22. Video and animation
    1. Video editing in Photoshop
    2. Edit video and animation layers
    3. Video and animation overview
    4. Preview video and animations
    5. Paint frames in video layers
    6. Import video files and image sequences
    7. Create frame animations
    8. Creative Cloud 3D Animation (Preview)
    9. Create timeline animations
    10. Create images for video
  23. Printing
    1. Print 3D objects
    2. Print from Photoshop
    3. Print with color management
    4. Contact Sheets and PDF Presentations
    5. Print photos in a picture package layout
    6. Print spot colors
    7. Print images to a commercial printing press
    8. Improve color prints from Photoshop
    9. Troubleshoot printing problems | Photoshop
  24. Automation
    1. Creating actions
    2. Create data-driven graphics
    3. Scripting
    4. Process a batch of files
    5. Play and manage actions
    6. Add conditional actions
    7. About actions and the Actions panel
    8. Record tools in actions
    9. Add a conditional mode change to an action
    10. Photoshop UI toolkit for plug-ins and scripts
  25. Content authenticity
    1. Learn about content credentials
    2. Identity and provenance for NFTs
    3. Connect accounts for creative attribution
  26. Photoshop 3D
    1. Photoshop 3D | Common questions around discontinued 3D features

Data-driven graphics make it possible to produce multiple versions of an image quickly and accurately for print or web projects. For example, you can produce 100 versions of a web banner with different text and images, all based on a template design.

Follow these general steps to create graphics from templates and data sets:

Create the base graphic to use as the template.

Use layers to separate the elements that you want to change in the graphic.

Define variables in the graphic.

Variables specify the parts of the image that change. (See Define variables.)

Create or import the data sets.

You can create the data sets in the template, or import them from a text file. (See Define a data set and Creating data sets in external files.)

Preview the document with each data set.

To see how your final graphics will look, you can preview before you export all the files. (See Preview or apply a data set.)

Generate your graphics by exporting them with the data.

You can export them as Photoshop (PSD) files. (See Generate graphics using data sets.)

Photoshop Different versions of an image using variables
Creating different versions of an image using variables

A. Source file template B. User defines layers as variables. C. Different versions of the image can be created, each with a different variable data set. 

Define variables

You use variables to define which elements in a template change. You can define three types of variables. Visibility variables show or hide the content of a layer. Pixel Replacement variables replace the pixels in the layer with pixels from another image file. Text Replacement variables replace a string of text in a type layer.


GoLive recognizes all text and visibility variables, but not Pixel Replacement variables.

Photoshop define variables
Two versions of an image based on the same template

A. Visibility variable B. Pixel Replacement variable C. Text Replacement variable 

You cannot define variables for the Background layer.

  1. Choose Image > Variables > Define.
  2. Select a layer from the Layer pop‑up menu that contains the content you want to define as a variable.

  3. Select one or more types of variables:


    Shows or hides the content of the layer or the layer group.

    Pixel Replacement

    Replaces the pixels in the layer with pixels from another image file.

    Text Replacement

    Replaces a string of text in a type layer.

  4. Do one of the following:
    • Choose Name and enter a name for the variable. Variable names must begin with a letter, underscore, or colon and cannot contain spaces or special characters (except for periods, hyphens, underscores, and colons).

    • Choose an existing variable from the Name pop‑up menu to link this layer to. Layers linked to the same variable are shown next to the Name menu, along with the link icon.

  5. For Pixel Replacement variables, set the following options.
    • Choose a method for scaling the replacement image: Fit scales the image so that it fits in the bounding box (which may leave parts of the bounding box empty), Fill scales the image so that it fills the bounding box entirely (which may cause the image to extend beyond the bounding box), As Is applies no scaling to the image, and Conform scales the image non-proportionally so that it fits in the bounding box.

    • Click a handle on the alignment icon  to choose an alignment for placing the image inside the bounding box. (This option is not available for Conform.)

    • Select Clip To Bounding Box to clip areas of the image that do not fit in the bounding box. This option is available only when the Fill or As Is replacement method is selected. (This option is not available for Conform.)

  6. To define variables for another layer, choose a layer from the Layer pop‑up menu. An asterisk appears next to the name of a layer that contains variables. You can use the navigation arrows to move between layers.
  7. Click OK.

Rename a variable

  1. Choose Image > Variables > Define.
  2. Choose the layer that contains the variable from the Layer pop‑up menu.
  3. To rename the variable, enter a name in the Name text box. Variable names must begin with a letter, underscore, or colon and cannot contain spaces or special characters (except for periods, hyphens, underscores, and colons).
  4. To remove the variable, deselect it.

Define a data set

A data set is a collection of variables and associated data. You define a data set for each version of the graphic that you want to generate.

  1. Do one of the following:
    • Choose Image > Variables > Data Sets.

    • If the Variables dialog box is open, choose Data Sets from the pop‑up menu at the top of the dialog box, or click Next.


    You must define at least one variable before you can edit the default data set.

  2. Click the New Data Set button  .
  3. Select a variable from the Name pop‑up menu or the list at the bottom of the dialog box.
  4. Edit the variable data:
    • For Visibility variables , select Visible to show the layer’s content or Invisible to hide the layer’s content.

    • For Pixel Replacement variables , click Select File and select a replacement image file. Click Do Not Replace before the data set is applied to leave the layer in its current state.


    Do Not Replace does not reset the file to its original state if another replacement has been applied previously.

    • For Text Replacement variables , enter a text string in the Value text box.
  5. Define additional data sets for each version of the graphic you want to generate.

You can edit, rename, or delete the data set later by first choosing it from the Data Set pop‑up menu and editing its options. Use the arrow icons to move between data sets. Click the Delete icon to delete a data set.

Preview or apply a data set

You can apply a data set’s contents to the base image while leaving all the variables and data sets intact. This changes the look of the PSD document to contain the values of the data set. You can also preview how each version of your graphic will look with each data set.


Applying a data set overwrites your original document.

  1. Choose Image > Apply Data Set. Select the data set from the list and preview the image in the document window. To apply the data set, click Apply. Click cancel if you are previewing and don’t want to change the base image.

    You can also apply and preview a data set in the Data Set page of the Variables dialog box.

Generate graphics using data sets

After you define variables and one or more data sets, you can output, in batch mode, images using the data set values. You can output images as PSD files.

  1. Choose File > Export > Data Sets As Files.
  2. Enter a base name for all files generated. You may create your own file-naming scheme if you want.
  3. Click the Select Folder button to select a destination directory for your files.
  4. Choose data sets to export.
  5. Click OK.

Creating data sets in external files

You can quickly create a large number of data sets by creating an external text file that contains all the variable information and loading that file into a PSD document containing variables. One method is to enter your data into a text file or Microsoft Excel spreadsheet and then export it to a tab or comma-separated file.

The syntax of the external text file is as follows (where each line that starts with “Variable” or “Value” is an entire line by itself in your file):

VariableName1<sep>VariableName2<sep> <sep>VariableNameN <nl> 

All the variable names are listed on the first line, in the order that the values are given in subsequent lines. Each subsequent line represents one data set, with the values for each variable given.


To create multiple lines of text in a single line of text in a data set, enclose the text in double quotes and insert hard returns in the tab- or comma-separated file where you want the breaks to occur.  

External text file syntax elements


Either a comma-separated (CSV) or a tab (tab-delimited) file that separates each variable name or value.


A newline character that ends each data set and can be a line feed, carriage return, or both.

“true” and “false”

Allowed values for a visibility variable.


Spaces around the delimiter are removed when parsing the file; between words in a value string (e.g., two of a kind) spaces are maintained and leading and trailing spaces are maintained if enclosed in double quotes (e.g., “one kind ”).

Double quotes

Can be part of a value if preceded by another double quote (e.g., ““B”” would be “B” in the data set).

If <sep> or <nl> is part of the variable value, then the entire value must be enclosed in double quotes.

All variables defined in the PSD document must be defined in the text file. An error is displayed if the number of variables in the text file does not match the number in the document.

Example data set:

Using a template for flowers that holds variables for tulip and sunflower, you can set up a text file that looks like this:

{contents of FlowerShow.txt} 
Variable 1, Variable 2, Variable 3 
true, TULIP, c:\My Documents\tulip.jpg 
false, SUNFLOWER, c:\My Documents\sunflower.jpg 
false, CALLA LILY, c:\My Documents\calla.jpg 
true, VIOLET, c:\My Documents\violet.jpg

You can use a relative path for the image location if the text file is in the same folder as the image file. For example, the last item in the example can be: true, VIOLET, violet.jpg.

Import a data set

  1. Do one of the following:
    • Choose File > Import > Variable Data Sets.

    • Choose Image > Variables > Data Sets and click the Import button.

  2. Navigate to the text file to import.
  3. Set up your import options.

    Use First Column For Data Set Names

    Names each data set using the content of the first column of the text file (the values for the first variable listed). Otherwise, the data sets are named “Data Set 1, Data Set 2, and so on.”

    Replace Existing Data Sets

    Deletes any existing data sets before importing.

  4. Set the encoding of the text file or leave the setting Automatic.
  5. Click OK.
Adobe logo

Sign in to your account