# Upload Image into Wordpress Media Library

**URL:** https://community.gravityforms.com/t/upload-image-into-wordpress-media-library/5932
**Category:** Get Help
**Tags:** file-uploads, media-library
**Created:** [August 28, 2020, 6:08pm UTC](https://community.gravityforms.com/t/upload-image-into-wordpress-media-library/5932 "2020-08-28T18:08:05Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![vitamineg](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/vitamineg/32/156_2.png) [@vitamineg](https://community.gravityforms.com/u/vitamineg)
#### Post date: [August 28, 2020, 6:08pm UTC](https://community.gravityforms.com/t/upload-image-into-wordpress-media-library/5932/1 "2020-08-28T18:08:05Z")

</div>

Heyya, I’m wondering if Gravity Forms has a native way uploading images from a form submission to the Wordpress library yet?

I know [Gravity Wiz has a plugin just for this](https://gravitywiz.com/documentation/gravity-forms-media-library/) but, I’m just trying to be as lightweight as possible …fewer plugins the better.

Thanks!

---

<div class="post-metadata">

### Author: ![sacom](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/sacom/32/53_2.png) [@sacom](https://community.gravityforms.com/u/sacom)
#### Post date: [August 28, 2020, 10:56pm UTC](https://community.gravityforms.com/t/upload-image-into-wordpress-media-library/5932/2 "2020-08-28T22:56:35Z")

</div>

Hi @vitamineg, is the form intended to create a post or just a regular entry?

---

<div class="post-metadata">

### Author: ![vitamineg](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/vitamineg/32/156_2.png) [@vitamineg](https://community.gravityforms.com/u/vitamineg)
#### Post date: [August 28, 2020, 11:21pm UTC](https://community.gravityforms.com/t/upload-image-into-wordpress-media-library/5932/3 "2020-08-28T23:21:25Z")

</div>

Intended to create a post.

---

<div class="post-metadata">

### Author: ![sacom](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/sacom/32/53_2.png) [@sacom](https://community.gravityforms.com/u/sacom)
#### Post date: [August 29, 2020, 12:09am UTC](https://community.gravityforms.com/t/upload-image-into-wordpress-media-library/5932/4 "2020-08-29T00:09:47Z")

</div>

If you use Gravity Forms core Post Creation feature, only the Post Image field type is attached to the media library: [https://docs.gravityforms.com/post-image/](https://docs.gravityforms.com/post-image/)

If that doesn’t fit your needs and you want to stick to the core functionality, you can use the [gform\_after\_create\_post](https://docs.gravityforms.com/gform_after_create_post/) hook that runs just after the post creation, and the media\_sideload\_image() WP core function [https://codex.wordpress.org/Function\_Reference/media\_sideload\_image](https://codex.wordpress.org/Function_Reference/media_sideload_image) to attach the files uploaded to the post.

The hook provides you the information that you need to pass to the media\_sideload\_image() function, the [$entry object](https://docs.gravityforms.com/entry-object/) from where you can grab the values of the fields (the URL to the file) and the $post\_id

Or if you have an Elite license, the Advanced Post Creation add-on [https://www.gravityforms.com/add-ons/advanced-post-creation/](https://www.gravityforms.com/add-ons/advanced-post-creation/) lets you attach to the media library files uploaded with any standard upload field [https://docs.gravityforms.com/creating-a-feed-for-the-advanced-post-creation-add-on/#post-content](https://docs.gravityforms.com/creating-a-feed-for-the-advanced-post-creation-add-on/#post-content)

---

<div class="post-metadata">

### Author: ![vitamineg](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/vitamineg/32/156_2.png) [@vitamineg](https://community.gravityforms.com/u/vitamineg)
#### Post date: [August 29, 2020, 4:42am UTC](https://community.gravityforms.com/t/upload-image-into-wordpress-media-library/5932/5 "2020-08-29T04:42:06Z")

</div>

Thank you @sacom. I think that’s what I need.

---

<div class="post-metadata">

### Author: ![richardw8k](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/richardw8k/32/2354_2.png) [@richardw8k](https://community.gravityforms.com/u/richardw8k)
#### Post date: [January 4, 2022, 5:55pm UTC](https://community.gravityforms.com/t/upload-image-into-wordpress-media-library/5932/6 "2022-01-04T17:55:23Z")

</div>


