Delete files from image uploads [RESOLVED]

I have a form that allows upload of an image file. All these images obviously get saved on the web server and therefore decreasing available space and increasing the size of backup files.
My questions are:

  1. Where do I find the image files uploaded via GF form?
  2. Will deleting the files on a regular basis, like once every few months, do any harm to the form submissions, or even break the database?
  3. Would deleting the form submission entries also delete the submitted image files?
  4. If yes, would this be the better/safer practice to do?
  5. Any better recommendations to deal with the issue?

Hey @Andre_B,

  1. Gravity Forms stores all file uploads in /wp-content/uploads/gravity_forms/{form_id}-{hash}/{year}/{month}/
  2. If you manually delete the files on disk, the only negative I believe is Gravity Forms still thinks the files are present and will include broken links to the files when viewing entries.
  3. Yes, deleting an entry will delete any uploaded files associated with the entry
  4. From a data-integrity point of view, yes. Deleting old entries is the better choice
  5. If a long-term archive of uploaded images is important, you could look at using a plugin to optimize the images before they are uploaded to your server. The core Image Hopper plugin can do this (disclosure: I’m the author and so biased :slightly_smiling_face:), but there are a few other options in the GF ecosystem.
2 Likes

Many thanks for the detailed response. Greatly appreciated.