Field Properties - Image Tab - Display¶
By default, the image is displayed using the original aspect ratio and resized to fit inside the field boundaries. This is the ‘Fit’ item of the ‘Image display’ option. It can be changed to ‘Fill’, which ignores the aspect ratio and stretches or compresses the image, or ‘Original’, which keeps the original aspect ratio and size but clips the image when it does not fit.
The display option can be set using a function. Use one of the predefined image display constants as the return value.
An example of a function using a constant can be:
return drImageFit