Skip to main content

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

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?


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 ☺️


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‌


Fantastic – thank you! Worked perfectly.


great!

please mark correct answer.


Reply