Can I embed a user uploaded image in a customized thank you message?

  • goiwebmaster
    Asked on March 12, 2014 at 1:01 PM

    I am new to JotForm so I apologize if this question is already answered in the support forums and I couldn't find it.

    I know how to allow a user to upload an image in a form. (That is a very useful feature by the way! Thank you JotForm!).

    What I want to do is have a user upload an image file in a form and when they are given the customized thank you message they are shown the image they just uploaded via the form.

    Thank you for any help you can provide on a solution for doing this.

  • goiwebmaster
    Replied on March 12, 2014 at 1:13 PM

    I should clarify that I have read about the {IMG:...} variable but it just doesn't seem to work.

    The image never appears in the custom thank you message or email notification that is sent.

  • goiwebmaster
    Replied on March 12, 2014 at 1:36 PM

    Now the image embed is showing up (?) when it wasn't before!  That part seems to be working consistently now.

    I am able to manipulate the preview size by using {IMG:FileUpload:WIDTH:HEIGHT} but I think I am misunderstanding one of the options.

    When I do the following for example {IMG:FileUpload::200} I thought it was supposed to display a 200px high version of the image with the proportions contrained to the original proportions. What is displaying for me is an image 200px high by 1px wide. 

    Can someone help me understand what {IMG:FileUpload:200} or {IMG:FileUpload::200} is supposed to do?

    Thanks!  JotForm is pretty awesome!

  • Jeanette JotForm Support
    Replied on March 12, 2014 at 4:22 PM

    This is because by putting , {IMG:FileUpload::200}  you made the width to be as 1 px, by default

    Let me explain you how this works:

    For example, if you wan to display an uploaded image with :  width as 75px and height as 200px

    Then the tag should look like:

    {IMG:uploadImage:75:200}

    So the sintax is :

    {IMG:uploadImage:width:height}

  • goiwebmaster
    Replied on March 12, 2014 at 4:27 PM

    In some of the other support forum threads some of the answers implied that {IMG:FileUpload::200} would force the width to be automatically calculated. 

  • goiwebmaster
    Replied on March 12, 2014 at 4:30 PM

    Serkan actually said what I just said in this thread:
    http://www.jotform.com/answers/7331-Can-uploaded-images-be-displayed-in-email-alerts-instead-of-just-links-to-the-images

    He said "You can provide one dimension such as {IMG:uploadImage:200} or {IMG:uploadImage::200} the missing dimension will be automatically calculated by the browser."

    What would be the point of embedding an image that was 1px wide or 1px tall when it started as a regularly sized image?

  • goiwebmaster
    Replied on March 12, 2014 at 4:38 PM

    @Jeanette

    I'm seeing a number of other threads (example: http://www.jotform.com/answers/268606-Image-Display-at-Thank-You-Page-is-cut-off-at-the-bottom) where JotForm Support folks say something different than you did about the expected behavior of using {IMG:FileUpload:200} or {IMG:FileUpload::200}

  • Jeanette JotForm Support
    Replied on March 12, 2014 at 6:41 PM

    What Serkan said on that old thread is also true, the browser should automatically calculate the missing dimension, I would say I use the width and let the browser to calculate the height.

    What would be the point of embedding an image that was 1px wide or 1px tall when it started as a regularly sized image?

    You can do it either way, by letting the browser to calculate on of the dimensions, or by setting the fixed dimensions

  • goiwebmaster
    Replied on March 13, 2014 at 2:35 PM

    @Jeanette

    To be fair you can't say that what Serkan said is "also" true. The expected behavior of the example I gave is either what Serkan wrote or what you originally wrote.  It can't be both. The explanation originally given in this thread is not accurate.

    But back to the original question, it appears to be working as Serkan explained it in the other thread for me now but only in Chrome and Safari.  For some reason it is still making the image either 1px high or wide (depending on the dimension you leave out) in my Internet Explorer.  But I had some friends test it and their Internet Explorer it is showing up correctly so I can only assume there is something weird going on in my Internet Explorer.

  • Mike_T Jotform Support
    Replied on March 13, 2014 at 5:54 PM

    The {IMG:upload::200} tag is fine, but it appears that IE 8 can not render images with blank width/height attributes. However, this is not a problem for IE 9+ and modern browsers.

  • goiwebmaster
    Replied on March 13, 2014 at 6:15 PM

    @Mike_T

    Thanks Mike!