• Resolved sbmanolo

    (@sbmanolo)


    Hi,

    I’m using Gravity Forms in a website where users can upload images through a form. These images are not being uploaded in “wp-content/uploads/some-year/”, but are being uploaded to the directory “wp-content/uploads/gravity-forms/folders-for-each-form”.

    the problem is that Imsanity is ignoring that directory and i would like to know what do i have to do to tell it to search there.

    Taking a quick look in the code, I can see that there is a variable which looks to point to “/uploads” in “imsanity.php” >

    $uploads=wp_upload_dir()

    and another one in “libs/utils.php” >

    $upload_dir = wp_upload_dir( null, false, $refresh_cache )

    It’s enough to change these variables or do I have to modify anything else to tell Imsanity to search in “wp-content/uploads/gravity-forms/folders”

    Thanks in adavance

    • This topic was modified 4 years, 8 months ago by sbmanolo.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author nosilver4u

    (@nosilver4u)

    There is no way to make Imsanity search outside the uploads folder, as it doesn’t actually do a directory search. Rather, it queries the WordPress database for a list of media, and only resizes those images.

    Since you need something to optimize images from Gravity Forms, I would recommend you try the EWWW Image Optimizer. To my knowledge, it’s the only plugin that lets you resize/scale images outside the Media Library.

    Thread Starter sbmanolo

    (@sbmanolo)

    Thank you very much!

    It’s great to know that. I’ll try EWWW Image Optimizer to see if it works for me.

    Thanks again!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Change where Imsanity searchs for images’ is closed to new replies.