image

The image property defines the image resource to be displayed in the form item.

Usage:

This property is used to define the image resource to be displayed for form items such as a button, buttonEdit, or a static image.

The resource string can be:

  1. A simple file name (with or without extension), using a relative or an absolute path.
  2. A path to an image on a server in the URL (Uniform Resource Locator) form.

It is recommended that you use simple image file names without the file extension, and define the GSTIMAGEPATH environment variable to centralize image files on the application server in a directory created specifically for images. For portability reasons, use .png or .svg image file formats only.

Supported image formats

Here is the list of image file formats supported by the different front-ends:

Table 1. List of image file formats supported by different front-ends
Suffix (case insensitive) Front-ends supporting the file format
.BMP GDC, GWC
.GIF GDC, GWC
.ICO GDC, GWC
.JPG GDC, GWC
.PNG GDC, GWC
.SVG GDC, GWC
.TIFF GDC, GWC

According to the front-end type, some image file formats or image data formats might not be supported.

Using file names or paths

If the image specification is a simple string without an URL or URI prefix, it is identified as a file path. The file is first sought in the picture directory on the client workstation. According to the front-end type, this local directory can actually be on a remote machine where the GAS middleware component is located. If the file is not found, the front-end automatically sends an image request to the runtime system, in order to search for an image on the server where the programs are executed. The runtime system searches for server-side images by using the GSTIMAGEPATH environment variable. If GSTIMAGEPATH is not set, the image files are searched in the current working directory.

Important:

By default, if GSTIMAGEPATH is not set, the image files are searched in the current working directory. Image filenames can use absolute or relative paths and the whole application server file system can be searched (according to the permissions of the operating system user running the gstrun process). This can be a security hole because fake front-ends could ask for critical server files that are not images.

When setting GSTIMAGEPATH, the runtime system will only transfer files found in the directories listed in that environment variable. You can still use absolute or relative paths in the image file names, but the files must be located below one of the directories listed in GSTIMAGEPATH. For maximum security, put the image files in directories that contain only image files, and keep critical data or program file in separate directories.

Images displayed by program to image fields do not follow the GSTIMAGEPATH security restriction. Image field do not use the IMAGE property. For image fields, the field value specifies the image.

Using an image server with URL names

If the image specification starts with a URL prefix, the front-end will try to download the image from the location specified by the URL.

Currently supported URLs are:

Table 2. Supported image resource locations (URLs)
Image resource location (URL) Description
http://location-specification HTTP server
https://location-specification HTTPS server (HTTP over SSL)
ftp://location-specification FTP server