Version Notice: This article covers features in our r9/IS Pro platform. If you're looking for information on this topic related to r8, see Adding images to a survey.
The IntelliSurvey platform allows Survey Programmers (SPs) to upload images to be displayed in the survey. Images should be added to the survey's images subfolder, located in the _s folder, to enable the use of the show_image
and option_images
tags. Uploaded images can then be referenced in SPL. Images can also be added directly to the SPL by dragging and dropping them into the Editor applet when in SPL mode. This will simultaneously upload them to the images folder.
For more information on the file manager, see Survey files.
Uploading images to the file manager
The Files applet, part of the Assets applet group, can be used to upload images and other files to the survey. To upload a file, first navigate to the images subfolder, found within the _s folder. When the folder is selected, click the Upload files button from the toolbar.
After clicking the Upload files button, a dialog box will open for your system's file manager. Multiple images may be selected; they will all be uploaded at once. To select more than one image, hold the Ctrl key (PC) or ⌘ key (Mac) while clicking on each image.
Note: Please ensure that the file names do not contain spaces. Underscores are acceptable.
Alternatively, you can upload images by clicking and dragging them from your system's file manager into the IntelliSurvey file manager, as shown below. Multiple images can be dragged and dropped at once, by selecting multiple in your system's file manager before dragging.
The newly uploaded files will appear in the file manager immediately.
Copying an image URL to clipboard
To reference an uploaded image in SPL, use either the Copy Path or Copy as <img> buttons in the file manager toolbar. Select the image in the file manager, then click the button to copy the URL to your clipboard. A message saying "Copied!" will appear for confirmation. The link may then be pasted into the source code by pressing Ctrl+V (PC) or ⌘+V (Mac).
The Copy Path button will add the image's URL to your clipboard. The Copy as <img> button copies the URL, and also includes the HTML necessary to display the image in the survey.
Button | Format of copied text | Example |
Copy Path | /survey/<survey_id>/_s/images/<filename> |
/survey/mysurvey/_s/images/cat_480.jpg |
Copy as <img> | <img src="/survey/<survey_id>/_s/images/<filename>" /> |
<img src="/survey/mysurvey/_s/images/cat_480.jpg" /> |
In most cases, SPs will want to copy the file path that already contains the img src
HTML wrapper, for example, to use as the input for an explain
tag.
Note: When copying and pasting a file reference via the Copy Path button, be sure to include the appropriate HTML wrappers around the file reference.
Adding images directly to source code
Images may also be directly uploaded into survey source code via drag and drop. For the drag and drop method, simply click on the desired image to select it wherever it is located on your device, then drag it into the survey source editor. Before releasing the mouse button, note the cursor in the editor indicating where the image will be inserted. Images inserted in this way will be automatically uploaded to the images subfolder in the file manager.
The URL for the image will be pasted in the editor as an HTML string, using the format:
<img src="/s/<survey_id>/images/<imagename>" alt="<imagename>" />
Comments
0 comments
Please sign in to leave a comment.