Image Zoom Questions
An image zoom question shows an uploaded image in a deep-zoom viewer and lets the user mark a region on it by dragging a selection box. The stored answer is not the image itself but the selection: which image was chosen and which area on it was marked — for example the plot on a map where an inspection took place, or the damaged spot on a photo.
The question does not upload images itself. It reads images that were uploaded through a file question — the standard question type that stores files with a result — which can live in the same questionnaire or in another questionnaire of the same survey. The image zoom question is configured with the survey, the questionnaire and the file question to read from, and its dropdown then lists every PNG or JPG image that was uploaded through that file question.
Image zoom questions are useful when:
- A map or plan is uploaded once and each result marks a different area on it.
- Field staff photograph a large board, sign or field and need to point out the exact spot that matters.
- The marker needs to land in a report — both the cropped region and the full image with the marked box can be printed.
Where the images come from
The link to the uploaded images is made in the questionnaire designer, in the question's Choices from survey results section:
| Setting | Purpose |
|---|---|
| Survey | The survey the file question belongs to. |
| Questionnaire | The questionnaire inside that survey that contains the file question — it does not have to be the questionnaire the image zoom question is in. |
| Question | The file question to read from. The dropdown only lists file-type questions, so pick the question users upload the images through. |
When the questionnaire runs, the question collects every file stored through that file question and keeps the images — PNG, JPG and JPEG; other file types are ignored. The user picks one from the Select Image dropdown, which shows each file's name and upload date. If nothing was uploaded through the file question yet, the question reports that no images were found — the fix is to upload images through the file question first, not to configure anything else.
Because the images come from real stored results, a change to the uploads changes the list: newly uploaded images appear, and there is a Reload button to fetch the current image again.
Marking a region
The selected image opens in a zoom viewer: scroll or pinch to zoom, drag to pan — the viewer handles large, detailed images that would not fit on screen. A red dashed box marks the selected region; the user drags it into place and resizes it until it covers the area of interest. A hint under the viewer reads Adjust the red box to select a region, and once a box is drawn the status confirms Selection saved automatically — there is no save button for the selection itself.
Below the viewer, the selection details show the marked region's coordinates, its width and height in pixels, and the size of the full image. The controls are:
- Select Image. Switches to another uploaded image. Choosing a different image starts a fresh selection for it.
- Reload. Fetches the image again from storage.
- Expand. Opens the viewer in a full-screen overlay for detailed zooming.
- Reset Selection. Clears the marked region so a new box can be drawn.
The answer stored for the question contains the image name and link, the selected region (in pixels and in coordinates relative to the image size, so the mark stays correct whatever the display size), the zoom and pan position, and when the selection was made. Reopening the result restores everything: the same image loads, the box sits where it was left, and the viewer is zoomed exactly as before. In a read-only questionnaire the image and its saved selection can still be viewed, but nothing can be changed.
The selection in reports
In Word report templates, an image zoom question offers two image placeholders:
{%questionName}inserts the cropped selected region — just the marked area.{%!questionName}inserts the full image with the region marked as a red dashed box, so the reader sees where the marked area sits in the whole picture.
Both accept the size option, for example {%questionName|maxSize:400}. The Word Report Templates tutorial covers the placeholders in detail.
Basic examples
Example 1: marking a plot on a shared map
A map image of the site is uploaded once through a file question called documents. Each inspection result should mark the plot that was inspected.
- Make sure the file question documents exists in a questionnaire of the survey and the map image was uploaded through it.
- Add an image zoom question named inspectedPlot to the inspection questionnaire.
- In its Choices from survey results settings, pick the survey, the questionnaire holding documents, and the documents question itself.
- In the field, the inspector selects the map from the dropdown, zooms to the right area and drags the red box over the inspected plot. The selection saves automatically with the result.
- The inspection report prints the cropped plot with
{%inspectedPlot}and the overview map with the marked box through{%!inspectedPlot}.
Example 2: pointing at a detail on an uploaded photo
A photo of a machine plate or a large label is uploaded through a file question; the reviewer must mark the serial number on it.
- Configure an image zoom question to read from the file question the photo is uploaded through.
- Open the photo in the viewer, press Expand for a closer look, and position the red box over the serial number.
- The stored answer now says exactly which region of which uploaded image holds the number — and the report can show just that detail.