cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
raquelm
Nintex Newbie

Lock image aspect ratio.

Jump to solution

I am working in an image library and am having difficulties with the image preview. Most of the files display correctly but large files do not (I only see the top left of the image).  The files need to be kept the sizes they are.  The properties only seem to allow me to modify via a % which distorts the image.  Does anyone know how I can lock the aspect ratio of the image and perhaps limit the frame size it shows in (as I don't want the form to explode in size). I have also tried responsive forms with no luck.

Any advice would be appreciated.

Raquel

Labels: (2)
0 Kudos
Reply
5 Replies
emha
Nintex Newbie

Re: Lock image aspect ratio.

Jump to solution

can you provide more details on your setup?

do you use image control to display preview?

or kind of trick with calculated value control?

or any other approach?

Reply
raquelm
Nintex Newbie

Re: Lock image aspect ratio.

Jump to solution

Hi Marian

Nothing fancy involved, just a straight image control. I have also tried it in a panel with various combinations of ‘resize at runtime’.

Thanks ☺

0 Kudos
Reply
emha
Nintex Newbie

Re: Lock image aspect ratio.

Jump to solution

try to add CSS style like following into form settings >> custom CSS

.ImgPreview{
   display: block !important;
   max-width:400px  !important;
   max-height:300px !important;
   width: auto !important;
   height: auto !important;
}
‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

and configure class "ImgPreview" for your image control

‌  custom css‌‌ max size‌

0 Kudos
Reply
raquelm
Nintex Newbie

Re: Lock image aspect ratio.

Jump to solution

Fantastic – thank you! Worked perfectly.

0 Kudos
Reply
emha
Nintex Newbie

Re: Lock image aspect ratio.

Jump to solution

great!

please mark correct answer.

0 Kudos
Reply