Is it possible to compare image sizes using an if statement in a repeat based on an image question with an appearance of multiline? Most photos are taken in landscape mode but sometimes it is in portrait. I don't want to squish the portrait photos.
${#photos}
${if $file | getValue:"height" > $file | getValue:"width"} ${$file | size:400:600} ${/}
${if $file | getValue:"width" > $file | getValue:"height"} ${$file | size:600:400} ${/}
${/}
Usually, I get this error when uploading the template:
Error: An error occurred when checking the report template. The end tag ${/} is unopened.
Sometimes it loads but fails on the generating of the report:
An error occurred when rendering by the report engine. Failed to parse ${if $file | getValue:"height" > $file | getValue:"width"} since it is an invalid expression.
Solved! Go to Solution.
I don't believe this is a supported operation. Cool idea though.
When specifying a photo's height width, there are two things to consider: 1) width x height, and 2) max width x max height. [See Images and other attachments]
Right now, you have width x height specified. Have you tried specifying a max? E.g.,
${image1 | size:0:0:600:600}
I don't believe this is a supported operation. Cool idea though.
When specifying a photo's height width, there are two things to consider: 1) width x height, and 2) max width x max height. [See Images and other attachments]
Right now, you have width x height specified. Have you tried specifying a max? E.g.,
${image1 | size:0:0:600:600}