WordPress.org

Ready to get started?Download WordPress

Forums

Imsanity
Resize Gravity Forms Post Image (4 posts)

  1. ZeroGravity
    Member
    Posted 2 years ago #

    Has anyone been able to get this working with Gravity Forms? I have an upload post image field on a form and Imsanity doesn't appear to intercept the upload.

    If anyone is family with GF and can point me to a hook or filter I can use I can possibly work it out. Love the plugin, just wish I could get it working with GF.

    Thanks

    http://wordpress.org/extend/plugins/imsanity/

  2. ZeroGravity
    Member
    Posted 2 years ago #

    I found this plugin that captures the Gravity Forms upload (http://wordpress.org/extend/plugins/the-auto-image-resizer/) but finding exatly which hook it is using and how to utilize it for Imsanity is a little above my PHP experience. I like the implementation and features of Imsanity more than the other. My guess is it is this hook.

    Add_Action ('add_attachment', Array($this, 'Catch_Upload'), 1, 1);

    Does anyone have suggestions how I could use this hook for Imsanity, assuming I have the correct one.

    Otherwise is it possible to be added to a future version?

  3. aimkbe
    Member
    Posted 1 year ago #

    I too am looking for a solution. Any luck @darren burns?

    I tried using auto image resizer, but that doesnt even work for me... can you help me out?

  4. Jason
    Member
    Plugin Author

    Posted 1 year ago #

    The function that needs to be called in imsanity is this:
    imsanity_handle_upload($params)

    $params array needs to look like this (to match wordpress standard upload handler):

    $params['type'] = image mime type (ex 'image/jpeg')
    $params['file'] = path to original file
    $params['url'] = public url to file

    that function in imsanity will return the exact same $params array that was passed in, but possibly the file may be changed, so the calling function needs to check to see if the filename was changed (for example a .bmp might be changed to a .jpg after the resize

    if any upload plugin can support that then it could use imsanity to resize images just with that one function call. or if the plugin has it's own hook, it could work as well as long as the plugin will check the return value to see if the filename has been changed.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.