PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

resize image before upload

  1. michaelbyrd123
    Member

    So I've got a form... its a pretty large one, and at the end the client needs to upload 24 images. Some of these images are quite large (2-3 megabytes each).

    I'm thinking I need to somehow shrink them down before they are uploaded. Any ideas on how I would go about doing this? Maybe I could use gdimage / timthumb somewhere... I'm not sure exactly where I should do this though. I'm guessing I'll have to use some custom code and hooks?

    Any advice would be appreciated.

    Posted 13 years ago on Friday December 17, 2010 | Permalink
  2. um. In a way I like this as it's a fairly easy question.

    WP uploads the image and does 3 things to it:

    create thumbnail
    create medium size
    create large size
    default original size

    What that means is that you have 4 choices for accessing and viewing images.

    You can set sizes in your WP administration and you can make adjustments to file upload size limit in wordpress as well.

    Posted 13 years ago on Friday December 17, 2010 | Permalink
  3. michaelbyrd123
    Member

    So the GD Form works through wordpresses upload. Does thatmean I just have to make sure that the php configuration, and wordpress configuration allow uploads at least as large as the images I'm uploading to avoid errors?

    Posted 13 years ago on Friday December 17, 2010 | Permalink
  4. Yes, Gravity Forms uses built in WordPress upload functionality. So as far as file size limitations, etc. goes you need to make sure that your PHP settings allow for it.

    Posted 13 years ago on Friday December 17, 2010 | Permalink
  5. michaelbyrd123
    Member

    The reason I'm asking, is that during a test with one of the 2mb images i got an error, Failed, temporary file could not be copied.

    Posted 13 years ago on Friday December 17, 2010 | Permalink
  6. michaelbyrd123
    Member

    Okay cool, I think the problem is just server configuration then.

    Posted 13 years ago on Friday December 17, 2010 | Permalink