Skip to main content
rohity0003
March 3, 2025
Question

Image Field - Document Image

  • March 3, 2025
  • 8 replies
  • 0 views

Background: This issue is only happening in our three environments (DEV).

Issue: When using an a!documentImage field inside a!imageField, the image only displays if the sit is set to 'FIT'.  It is not displaying for any other size setting (including null).  In the following code, the interface is only displaying the image where the size is set to 'FIT':

{
a!imageField(
label: "Image",
labelPosition: "ABOVE",
images: {
a!documentImage(document: a!EXAMPLE_DOCUMENT_IMAGE())
},
size: "MEDIUM",
isThumbnail: false,
style: "STANDARD"
),
a!sectionLayout(
contents: {
a!imageField(
images: {
a!documentImage(
document: cons!G_FILETYPE_ICON_IMG_SMALL
)
},
showWhen: true,
size: "FIT"
)
}
),
a!sectionLayout(
contents: {
a!imageField(
label: "Image Field Example",
images: {
a!documentImage(
document: a!iconNewsEvent(icon: "HAMMER", color: "BLUE")
),
a!documentImage(
document: a!iconNewsEvent(icon: "GEARS", color: "GREY")
),
a!documentImage(
document: a!iconNewsEvent(icon: "BRIEFCASE", color: "GREEN")
)})})}

FYI: In our other environments we are using the image field without issue ( in this root case, in an editable grid, with size of 'TINY' )
Thanks for your time any help you may be able to provide.

8 replies

stefanhelzle0001
March 3, 2025

What kind of image file format is this?

rohity0003
March 4, 2025

Hi Stefan,  the file type is PNG.

stefanhelzle0001
March 5, 2025

I suggest to open a support case and report this unexpected behaviour to Appian. When doing so, attach an affected image and some example code.

konduruc733182
March 4, 2025

Hello [mention:9ca8802553484a9e971195e3d49e4c2d:e9ed411860ed4f2ba0265705b8793d05] , In my experience what I have noticed is for few smaller images, imageField would fail to render when the size is set to any other value than "FIT". This would not happen with all document images, but very few with similar properties.

rohity0003
March 4, 2025

Hi Konduru, how did you all handle those images that would only display in 'FIT'?  Did you alter the image in some way?

konduruc733182
March 5, 2025

Either render those images and use the modified image in the document or just go with FIT.