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.

Check on image minimum width on upload

  1. I'm using a submission form where people can upload 10 images and was wondering if it's possible to check if attached files have a minimum width of 1024 pixels. Is that possible? Or maybe possible to include this kind of option in a future release?

    Posted 8 years ago on Wednesday May 9, 2012 | Permalink
  2. This should be doable with custom code in the Gravity Forms gform_validation hook.

    Posted 8 years ago on Wednesday May 9, 2012 | Permalink
  3. David Peralty
    Administrator

    Here's some PHP to help as well:
    http://www.electrictoolbox.com/php-get-image-size/

    Posted 8 years ago on Wednesday May 9, 2012 | Permalink
  4. Thanks!

    Posted 8 years ago on Wednesday May 9, 2012 | Permalink
  5. Have been reading the information but don't know how to start :). Are there any examples you might have to implement the hook and check? Would really appreciate it!

    Posted 8 years ago on Thursday May 31, 2012 | Permalink
  6. Found the solution: http://zzlatev.com/gravity-forms-upload-limits/

    Need to tweak for settings, but first test works like a charm!

    Posted 8 years ago on Thursday May 31, 2012 | Permalink
  7. Awesome, thanks for sharing!

    Posted 8 years ago on Thursday May 31, 2012 | Permalink