Image Attachment Control Dimensions

  • 29 February 2016
  • 1 reply
  • 7 views

Badge

When loading an image using the Image Attachment control, is it possible to identify said image's height and width in pixels?  My ultimate goal is to be able to dynamically resize an image inside the control (without showing the image's information) based upon the screen's size so when a Save as PDF method is used, the image would still maintain its original aspect ratio.


1 reply

Badge +1

You might consider adding a Data Label that contains CSS styling to resize the image. For example, if you have an image that is 100x100 pixels, you can resize it by adding the following to a Data Label (be sure to hide the control and place the CSS wtihin style tags.): <style>img {height:200px;width:200px;}<ENDStyle>

 

Before:

12356iFFEBC67A33A1B91B.png

 

In this way, you aren't actually changing the image's properties, but rather the output rendering.

 

I hope this helps.

Reply