Here is the script I am using:
app.alert("Content Type of the Image Field: " + imgFld.value.image.contentType);
Note that if I use other script such as:
app.alert("Image Field Name: " + imgFld.name);
The above script works in "Preview PDF" and "Preview HTML5". Meaning that the server is configured to work with HTML5 forms by setting the server options under Tools->options.