In some projects, like for example a Mystery shopping project, the respondents take photos in the survey to show deviations. These photos are often included in the data file as links (URLs) to the actual photos. With the function “Web variables” these photos can now be shown as thumbnails instead of links in the Respondent data table. The thumbnails of the photos are shown both online and in exports. The image below shows an example of how photos can be displayed in the Respondent data table. Each photo is present as a URL in the data file.
The photos are also clickable when the user clicks a photo the original photo is opened in a separate browser tab.
Before setting up the Respondent data table make sure that the URLs to the photos are present in the imported data, these should be stored in an Open-ended variable. In the Respondent data table, you will find the Web Variables function in the Settings tab as shown in the image further down. Currently, the Web variables function supports to show thumbnails of photos or Links to the photos. The image below shows the difference between the Link and Thumbnail option.
The image below shows the interface for defining the web variables.
To set up a table with web variables do the following:
- Create a Respondent data table and select the variables to be shown, the variable holding the links to the photos must be one of the selected variables
- In the new Web variables panel select, in the Variable dropdown list, which of the variables that hold the links
- In the Type list select if the link should be shown as a Thumbnail (only applicable when the link goes to an image file) or if the URL will render as a clickable link
- If the Thumbnail option is used the size of the thumbnail to be shown in the table has to be defined.
- 50 pixels is the default value.
- The value is applied to the height of the thumbnail, images are scaled retaining the original aspect ratio.
- If the Link option is used the link text can be defined and that will be displayed instead of the URL, if no link text is defined the actual URL will be shown
The thumbnails are included in the exports to PDF, PPT and to Excel. The thumbnails are not clickable links in the exported files.
Note: The generation of an Excel file with many of photos will take time due to the fact that hundreds or even thousands of photos needs to be inserted in the Excel file. The exports to PPT and PDF are not effected by longer generation times as these only contain a screenshot of the Respondent Data table as it is shown on screen (not all the respondents/photos are included in these exports, only those visible in the browser).
Note: please don't use any spaces in the URL. Thumbnails won't appear in case spaces are used.
To allow regeneration of image thumbnails in the event of updates to existing image files you can clear the cached thumbnails. You only need to clear the image cache in the case where the image files, stored externally, have been updated with new images.
Here we see the Clear cache option, the cached images are cleared for all the web variables in the project.