Add Uploaded Images to Rich Style Documents 

SKIP AHEAD TO 
When would you add uploaded images to a rich style document?
How to add images into your document
How to restrict image sizes
Limitations

 

When would you add uploaded images to a rich style document?

When images have been uploaded by the end user during an Assessment through the File Upload field in a FORM page, you can display this inside rich style documents.

  

How to add images into your document

Follow the below syntax to add uploaded images to your rich style document.

To start the image syntax, use the variable with the hash i.e. {{#FILE reference}}

To insert the image(s), use the fixed variable i.e. {{%image}}

To end the image syntax, use the file variable with a forward slash i.e. {{/FILE reference}}

For example:

{{#FILE1}} 
 
{{%image}} 
 
{{/FILE1}}

Note: 
Each line of text must be separated with spaces as shown below. 

INCORRECT Formatting:  CORRECT Formatting: 
{{#FILE1}} 
{{%image}} 
{{/FILE1}} 
{{#FILE1}} 
 
{{%image}} 
 
{{/FILE1}}


Where 'FILE1' is the variable name of the File Upload field and '%image' is the fixed variable where all uploaded images will be appear in the document. This syntax will allow the user to add the image into the Document at the size that it was uploaded. Should the size of the image exceed the width of the document the image will be automatically resized to fit the width of the page. 

  

How to restrict image sizes

To restrict the size of the image you can use either of the following two methods. 

  1. Restricting the pixel width of the image.

{{#FILE1}} 
 
{{%image | size:100}} 
 
{{/FILE1}} 

The above restricts the image to a width of 100 pixels. The image will retain the original ratio by adjusting the pixel height automatically. 

 

  1. Restricting both the pixel width and pixel height of the image.

{{#FILE1}} 
 
{{%image | size:200:300}} 
 
{{/FILE1}} 

The above restricts the image to a pixel width of 200 pixels and pixel height of 300. This will overwrite the original image ratio.

Note: The image's default alignment format will be ‘Center’ 

 

Limitations

  1. Supported image file types that can be uploaded are JPEG and PNG
  2. Only up to 50 images can be uploaded in the File Upload field at one time (For example: To upload 100 images, you will need to upload the first 50 images before continuing to upload the remaining 50 images)

 

Related Articles