🎉 Celebrate with 10% OFF on All Products! Use Code: GFEX10 Or Buy Any 2+ Items for 30% OFF with Code: GFEX30!
Guides & Tutorials October 13, 2026

How to Rename Gravity Forms File Uploads and Send Them to the Media Library

GravityExtra
How to Rename Gravity Forms File Uploads and Send Them to the Media Library

File Upload fields are where Gravity Forms forms meet the real world: job applications with CVs, competitions with photos, property listings with galleries, client briefs with logos. And that is where the clean-up work starts. Files arrive as IMG_4821.jpg and Final-final-v3.pdf, sit in a dated folder outside the Media Library, and phone photos come in at 12 megapixels when you only needed 1,600 pixels.

For files over your server limit, the Gravity Forms large file uploads add-on adds chunked, resumable uploads.

This guide explains what the standard File Upload field does and does not do, the options available, and how the Gravity Forms Upload Tools Pack Premium Add-on renames files with merge tags, enforces image size rules, scales down large images and copies uploads into the WordPress Media Library.

What the Standard File Upload Field Leaves to You

Gravity Forms lets you limit file types, file size and the number of files. After that, files are stored with whatever name they had on the visitor’s computer, in a folder under the Gravity Forms uploads directory, organised by form and date. They are not in the Media Library, so you cannot pick them in the block editor or attach them to a post without downloading and uploading them again.

There is also no way to say “at least two photos” or “images must be at least 1200 pixels wide”. Visitors upload a 300-pixel thumbnail and you only find out when you try to use it. On the other side, huge originals fill your disk and slow down every email they are attached to.

Common upload headaches
Meaningless file names. Hundreds of IMG_ files that you have to match to entries by hand.
No size rules. Images too small to print, or so large they fill the server.
Outside the Media Library. Uploads cannot be reused in posts, galleries or featured images.
Manual post building. Forms that create posts still need someone to attach the images.

Your Options Today

1. Rename and move files by hand

Download the files, rename them, upload them to the Media Library and attach them to the right post. Fine for a handful of entries a month, painful for a gallery or a recruitment campaign.

2. Custom code

Developers can rename files and create attachments with Gravity Forms hooks and WordPress media functions. It works, but file names built from visitor answers need careful cleaning so nobody can create odd folder paths, and the code needs to run before notifications are sent.

3. Other add-ons

Other Gravity Forms add-ons cover this with separate products: one to rename files, one to copy uploads into the Media Library and a richer uploader with features such as cropping and sorting. Each one is bought, set up and updated on its own.

Comparison: Ways to Manage Gravity Forms Uploads

Upload Tools Pack add-on Standard field Custom code Other add-ons
Rename with merge tags Yes, plus sub-folders No If you build it Separate add-on
Min files and image size rules Yes, checked on the server Max files and size only If you build it Separate uploader add-on
Scale down large images Yes, JPEG, PNG, WebP No If you build it See vendor docs
Media Library copies and featured image Yes No If you build it Separate add-on
Crop or reorder in the browser Reorder: yes (1.1). Crop: no No If you build it Separate uploader add-on
Cost From $39/year (1 site) $0 Developer time Varies per add-on

Prices for other add-ons and plugins vary by vendor and may change.

What Upload Tools Pack Does

Upload Tools Pack adds four tools that you switch on per File Upload field. Every tool can be switched off for the whole site. No scripts or styles are added to your forms unless you turn on the upload experience helpers of version 1.1 for a field.

  • File name templates. Name files with merge tags such as {entry_id}-{Company:3}-{filename}, plus {file_number} and {field_id}. The extension is always kept and nothing is overwritten.
  • Sub-folders. An optional sub-folder per field, such as clients/{Company:3}, created safely inside the form’s upload folder.
  • Upload rules. Minimum number of files, minimum and maximum image width and height, and maximum megapixels, shown under the field and checked on the server.
  • Image resizing. Large JPEG, PNG and WebP images are scaled down on the server with a quality setting you choose.
  • Media Library copies. Every upload copied into the Media Library with the submitting user as author, attached to the post created from the entry, with an optional featured image.
  • Merge tags. Attachment IDs and image size links for notifications and confirmations, plus a Media Library box on the entry detail page.

Files are renamed, resized and copied right after the entry is saved and before notifications are sent, so emails, attachments and download links already use the final files.

How to Set It Up, Step by Step

You need WordPress 6.5 or higher, PHP 7.4 or higher with the GD or Imagick image library (for resizing and thumbnails), Gravity Forms 2.9 or higher, a form with a File Upload field and an active GravityExtra license.

Step 1: Install the add-on and check the site switches

Upload and activate the add-on, go to Forms → Settings → Upload Tools and activate your license key. Under Features you see four toggles: File renaming, Upload rules, Resize large images and Media Library copies. They are on by default, but nothing changes on your forms until you turn a tool on for a field.

Under Media Library, Delete Media Library copies when an entry is deleted is off by default, so copies used in posts are safe.

Step 2: Turn the tools on for a File Upload field

Open the form, click a File Upload field and find the Upload Tools block on the General tab, below Maximum File Size. Tick Rename uploaded files and enter a template; the default is {entry_id}-{filename}. Names are cleaned automatically: spaces become dashes and special characters are removed. Add a sub-folder template if you want one folder per client.

Upload Tools block in the File Upload field settings with renaming, upload rules, resize and Media Library options
The Upload Tools block on a File Upload field: renaming, rules, resizing and Media Library options.

Step 3: Set upload rules and resizing

Tick Apply upload rules and fill in only the limits you need, for example at least 2 files and images at least 1200 × 800 pixels. The rules are added to the field description and checked on the server. On multi-file fields each image is also checked as it is uploaded, and a file that breaks a rule is refused with the reason next to its name.

Tick Resize large images to scale down anything larger than a maximum width or height, with a quality of 82 by default. Use resizing or a maximum size rule, not both: images that break a rule are refused rather than resized.

Gallery upload field showing the rules under the drop area and a refused image with the message that it must be at least 800 pixels wide
The rules under the drop area, and a refused image that is less than 800 pixels wide.

Step 4: Copy uploads to the Media Library

Tick Add files to the Media Library. When the form creates a post with Post fields, tick Attach to the post created from this entry and Set the first image as the featured image. Submit a test entry: the entry detail page now shows a Media Library box with each copy and an edit link. Entries marked as spam are not copied.

Media Library box on the entry detail page listing three images with links
The Media Library box on the entry detail page.

Pro Tips for Production Forms

  • Put the entry ID first. Templates such as {entry_id}-{Name:1}-{file_number} keep files sorted and easy to match to entries.
  • Build galleries from notifications. Use {Gallery:4:media_id} to get attachment IDs for a gallery shortcode, or {Gallery:4:media_url_medium} for image links.
  • Check your image library. If images are not resized, look at Tools → Site Health → Info → Media Handling for GD or Imagick.
  • Keep originals separate from copies. The original file stays with the entry, so deleting a Media Library copy does not break the entry.
  • Tell visitors the rules up front. The rules appear in the field description automatically, which cuts down on refused uploads.
Our recommendation

Turn on renaming for every File Upload field first; it costs nothing and saves hours of matching files to entries. Add upload rules on forms where image quality matters, and Media Library copies on forms that create posts or feed a gallery.

Tidy, Usable Uploads From Every Form

Rename files with merge tags, enforce image sizes, scale down large photos and copy uploads into the Media Library. Plans start at $39/year for one site, $69 for five sites and $149 for ten.

or read the Upload Tools Pack setup guide

New in 1.1: previews, reorder and drag-and-drop

Version 1.1.0 adds a fifth tool, Enhanced upload experience, that helps visitors before they press Submit. You tick it on a File Upload field and choose the helpers you want:

  • Thumbnail previews. Selected images appear as small thumbnails, drawn in the browser; nothing is uploaded to build them.
  • Drag to reorder. On a multi-file field, visitors drag files into order or use the up and down buttons, and the entry stores them in that order. With “Set the first image as the featured image”, the image at the top becomes the featured image.
  • Drag-and-drop. A single-file field gets a drop zone next to the Choose File button.
  • Instant type and size message. A file that is not an accepted type or is over the maximum size is flagged at once, and the same two rules are checked again on the server when the form is submitted.

A multi-file Gravity Forms upload field with image thumbnails and up and down buttons to reorder the uploaded files

Every helper is off until you tick it, and with JavaScript off the plain field still works. Full steps: upload experience helpers in the Upload Tools Pack guide.

New in 1.2: smaller photos before upload, and no GPS in your files

Most uploads now come from phones, and a phone photo is easily 4,000 pixels wide and several megabytes. On a slow connection the visitor waits, and a large photo can be refused by the field’s maximum file size. Version 1.2.0 adds an option to resize and compress images in the visitor’s browser before upload:

  • A maximum width and height per File Upload field. JPEG, PNG and WebP photos larger than that box are scaled down on the visitor’s device, and only the smaller copy is sent.
  • JPEG and WebP quality you choose (82 by default). PNG stays lossless and keeps its transparency.
  • Photos stay upright. The camera’s orientation note is applied while resizing, so a portrait photo is stored as a portrait.
  • Remove photo details. One tick removes the camera, date and GPS location from every photo, in the browser and again on the server, without touching the picture itself.
  • Safe fallbacks. PDFs, GIFs, animated images, HEIC photos and anything the browser cannot read are sent unchanged, and the server-side resize keeps working as a safety net.

A multi-file Gravity Forms upload field with two photos resized in the browser, their smaller sizes and thumbnails

The option is off until you tick it on a field, so existing forms do not change. Full steps: resize images in the browser in the Upload Tools Pack guide.

Frequently Asked Questions

Are existing entries renamed?

No. The tools work on new submissions only, so existing files and links stay as they are.

Can visitors upload file types the field does not allow?

No. Upload Tools only works on files Gravity Forms has already accepted and never changes the extension.

Does it work with File Upload fields in a Repeater?

Not yet. Repeater uploads, Post Image fields and files changed when editing an entry in the admin are not processed.

What happens to Media Library files if I uninstall?

They stay, because they may be used in your posts. Uninstalling removes the settings and the add-on’s entry data.

0
0
Your Cart
Your cart is emptyReturn to Shop
🔥 FREQUENTLY BOUGHT TOGETHER
Complete Combo & Save 40%!
ITEM IN YOUR CART
Gravity Forms Klaviyo Add-on
$39.00/yr
+
🎁 RECOMMENDED ADD-ON SAVE 40% OFF
Original Price: $39.00/yr
Bundle Special Price: $23.40/yr