Upload to the Media Library Using Gravity Forms

, , ,
The following code, when inserted into a custom plugin or your child theme’s functions.php file will forward all file uploads (images and documents) to your Media Library within your WordPress website. Special thanks to Kim G. who originally published the code snippet.


Gravity Forms Upload to Media Library

To include a script in the footer of your WordPress website you would want to open your child theme’s functions.php file and insert the following example code (excluding the php open and close php tags <?php at top and ?> at bottom):


I welcome your thoughts, questions or suggestions on my article on how to upload to the WordPress Media Library using Gravity Forms.

You may support my work by sending me a tip using your Brave browser or by sending me a one time donation using your credit card.

Let me know if you found any errors within my article or if I may further assist you by answering any additional questions you may have.


2 replies
  1. Jeff P.
    Jeff P. says:

    Results in a blank item in the Media Library called “Uploads” and an invalid permalink: site.com/wp-content/uploads/

    • Manny
      Manny says:

      Thanks for letting me know Jeff. Not sure I’ll get around to troubleshooting any issues with this script as I no longer need it. If I do I will be sure to review and update this post accordingly.

Comments are closed.