Image Variable Overview

An Image variable is a type of variable that represents an unknown image in your document. For example, if you want to ask a template user to insert a photograph you create an Image variable in your template to capture that specific item of data.


In HotDocs, an Image variable is a component that represents unknown image content in your template (i.e. an image value, such as a client's logo or a photograph of damage to support an insurance claim yet to be entered by the template user). You can create Image variables using the HotDocs Field Editor or Component Studio and Image variables are typically:

  • Referenced in the template by adding a placeholder field, indicating where HotDocs must place the variable's image value in the assembled document.
  • Added to a dialog, so the variable's question appears in the interview; template users can then upload the image they want to use in the document.

Common Tasks

Among others, Image variables enable you to accomplish the following common tasks:


When you create a template from an existing document, the existing document usually contains a placeholder image for the image that is unknown. To enable template users to provide the unknown image, you:

  • Create new Image variables to represent the individual unknown image values (either in the Field Editor or Component Studio)
  • Replace all placeholder images in the template with placeholder fields that reference your variables

When creating an Image variable, you can set properties that define how HotDocs gathers and processes the image value. For example, you start by setting the name property for the Image variable, which is used to identify the Image variable throughout Author and in the answer file. You can set the Prompt property to provide instructive text (as opposed to the Image variable name) to help a template user answer a question during the interview. Lastly, you can then group related image (and other) variables into dialogs to improve the usability and flow of an interview.

Once you have created the Image variable and set all of the properties you need, you can use the test feature to ensure the variable will behave as you desire when the document is assembled.

When to Use Image Variables

To better understand when to use an Image variable (as opposed to the other types of variables), consider the following:

  • An Image variable requires a user to upload an external image file, such as a logo, photograph or diagram.
  • Image variables are only supported in DOCX templates.

Image Variables and Formats

Unlike other variables, which take their own set of formats within HotDocs, you format Image variables using tools in Word. Once you have created an Image variable placeholder, use the Picture Format tools within Word to format the size of the image, borders or effects. Whereas other HotDocs variables are content controls in the template and replaced with merged text when assembled, Image variables are Word content controls at all stages.

In interview, HotDocs Advance supports JPEG and PNG file formats image files as answers, with a default maximum file size of 10MB.

Unanswered Image Variables

If an image variable is unanswered in the interview, a grey placeholder will show in the assembled document. Alternatively, you can set a default image for your image placeholder by clicking into the placeholder and inserting an image through Word. If the image variable is answered in the interview, the default image will be replaced in the document.

Common Reference Topics

Among others, the following reference topics may relate to this conceptual area: