What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.


  • Profile Image

    How to change the size of Preview Image in Image Upload Preview Widget?

    Asked by ellie123 on September 26, 2014 at 12:25 PM

    I am using the Image Upload Preview Widget on my form, but when a user is on their mobile device the huge previewed image does not look good.

    Where can I change this so the preview image is 100px x 150px? Or a percentage may even be better (i.e. 20%)

    It looks like the element is <img id="preview">

    I tried in the width and height settings but that only changes the width of the preview image and not the height.

    Thank you!

    size preview preview widget height Mobile settings
  • Profile Image

    Answered by Ben on September 26, 2014 at 02:50 PM

    Hi Ellie,

    You were right about the field that you would need to change, but as it had its own default settings applied directly onto it (inline style) we needed to make the change more important than it.

    This is the CSS that would shrink the preview to a size.

    #preview
    {
       width:150px !important;
    }

    You can see it in action here http://form.jotformpro.com/form/42685922562967

    To add the style you should follow these steps:

    I hope this helps you to accomplish what you wanted. You can of course change the width to any other from 150, to for example 200.

    Best Regards,
    Ben