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

How to Send Gravity Forms Uploads to Cloudinary (and Resize Them on the Way)

GravityExtra
How to Send Gravity Forms Uploads to Cloudinary (and Resize Them on the Way)

A Gravity Forms upload field is simple to add and easy to regret. A few months after launch the uploads folder holds thousands of phone photos at twelve megabytes each, the backups are slow, the host sends a disk warning, and the page that shows the pictures loads them at full size from your own server. Cloudinary solves the delivery half of this problem very well, and the missing piece is the bridge between the form and the account. This guide shows how to send every Gravity Forms upload to your own Cloudinary account, how to resize it on the way, and how to keep the CDN link in the entry.

What goes wrong with uploads on your own server

By default Gravity Forms stores uploaded files in a folder under wp-content/uploads. That works, and for a contact form with one PDF a week it is fine. It stops being fine when visitors upload photographs, because a modern phone writes pictures that are four to twelve megabytes each. Three things follow.

  • Disk space and backups. The uploads folder becomes the biggest part of your site and every backup has to carry it.
  • Slow pages. Whenever you show a submitted picture, the browser fetches the original, because nobody resized it. A grid of twenty entries is a hundred megabytes.
  • Work you do by hand. Someone downloads the pictures, shrinks them, and uploads them again to wherever they are needed.

A media service removes all three. Cloudinary stores the original, delivers it from a CDN, and can resize and convert it by changing the link. What you need is for the file to get there without anyone touching it.

The idea: upload at submission, keep the CDN link

The Gravity Forms Cloudinary Premium Add-on does exactly one job. When a form is submitted, it takes the files from the upload fields you choose and sends each one to your Cloudinary account with a signed upload. Cloudinary answers with the address of the stored file, and the add-on writes that address into the entry, in place of the address on your server. From that moment the entries list, the entry screen, the exports, the notifications and every other add-on see the Cloudinary link.

Because the account is yours, there is nothing in the middle. No third-party server sees the files, there is no usage meter on our side, and if you ever stop using the add-on the files are still in your account with their links.

Step 1: connect your account

Install and activate the add-on and enter your license key under Forms → Settings → Cloudinary. In the section for your account, enter the cloud name, the API key and the API secret that the Cloudinary dashboard shows under API Keys. Press Save and then Test connection; the test asks Cloudinary for its status and tells you in a few words whether the key works.

The Cloudinary settings screen in Gravity Forms: cloud name, API key, API secret that is stored encrypted, the largest file to send and the Test connection button
Your Cloudinary account: the secret is stored encrypted and is never shown again.

Two details matter for security. The API secret is stored encrypted, with a key derived from your site’s secret keys, and it is never shown again: the field stays empty after saving and leaving it empty keeps the saved value. And if you prefer to keep credentials out of the database, three constants in wp-config.php take their place.

Step 2: add a feed to the form

Open the form, go to Settings → Cloudinary and add a feed. Tick the File Upload fields you want to send; single and multiple upload fields both work. You can add a condition, so that only some submissions are sent.

The Cloudinary feed settings: file upload fields to send, folder with tokens, kind of file, file names, tags, allowed formats, transformations and the entry and server options
The feed: which fields, which folder, which transformation, and what to do with the entry and the local file.

The folder is where the files land in Cloudinary. It accepts tokens for the form, the field, the entry and the date, so a default such as gravity-forms/{form_slug}/{Y}/{m} gives you a tidy tree: one folder per form and per month. You can also choose how files are named: the original name with a short random ending (the safe default), the original name only, or a random name. The add-on always tells Cloudinary not to overwrite an existing file, so one visitor can never replace another visitor’s upload.

Step 3: choose what happens to the image

Here is where Cloudinary earns its place. A transformation is a short piece of text in the link that tells Cloudinary what to do: resize, crop around the subject, convert to a modern format, lower the quality until the eye cannot tell. The feed offers four ready choices and a custom box, in two places.

  • In the stored CDN URL. The default is the optimize choice, which is automatic format and automatic quality. The original is kept untouched in Cloudinary, and the link that goes in the entry delivers a light version. You can change your mind later, because the original is still there.
  • On upload. This changes the file before it is stored. It is off by default and it is the right tool when you want to cap the size of enormous originals, for example at 1600 pixels wide, and never store more.

A custom transformation uses the Cloudinary URL syntax, for example c_fill,w_800,h_600,g_auto for an 800 by 600 crop around the subject. The add-on checks the text before using it, so a typing mistake cannot produce a broken link or a path that points somewhere else.

Step 4: decide about the entry and the server

Store the CDN URL in the entry is on by default. Turn it off if you want the entry to keep the link to your server and use the Cloudinary link only through merge tags. Delete the local copy is off by default; when you switch it on, the file is removed from your server only after Cloudinary confirmed the upload, and only for the files that were sent successfully. A failed upload never costs you a file.

What it looks like on the entry

On the entry screen, a box named Cloudinary lists each file with its link and size, and a note says how many files were sent. If something went wrong, the note lists the files that were not sent and the reason, in plain words: the key was refused, the format is not allowed, the file is bigger than your limit.

A Gravity Forms entry screen with the Cloudinary box that lists the uploaded file with its CDN link and a Send files again button, and the note that one file was sent
The entry screen: the Cloudinary link of every file, a retry button and a note.

The box has a button, Send files again. It runs the feeds once more for that entry and skips every file that was already sent, so you can press it after fixing a key or after an outage without creating duplicates. It also lets you send the files of entries that were made before you installed the add-on.

Using the links in notifications and templates

Because notifications are sent after the upload, the file link in a notification is already the Cloudinary link when the entry stores it. For more control there are merge tags: {cloudinary_url} for the first link, {cloudinary_urls} for all of them, and the same with a field number, such as {cloudinary_url_3}. Developers can read everything that was sent with gfcloudinary_get_assets() and change the upload parameters with the gfcloudinary_upload_params filter.

How it works under the hood

The add-on uses the Cloudinary Upload API, REST version v1_1, with signed uploads. For each file it collects the parameters of the upload, sorts them by name, joins them into one string, appends your API secret, and sends the SHA-1 digest as the signature together with your API key. Cloudinary recomputes the signature and accepts the upload only if it matches and the timestamp is less than an hour old. A signed upload needs no upload preset, and the secret itself never leaves your server. Every request verifies the certificate of the Cloudinary host.

Only files inside the Gravity Forms upload folder are sent, and the add-on checks the real path of each file before reading it. The size limit is 20 megabytes by default and can be raised to 100, which is the limit of one upload request in Cloudinary.

Things to know before you start

  • The upload happens while the form is processed. A very large file makes the submission a little slower, so choose a limit that fits your plan and your hosting.
  • If Cloudinary is unreachable, the visitor still sees the confirmation. The file stays on your server, the entry gets a note, and you can send it later with the button.
  • Add Cloudinary to your privacy policy as a processor of uploaded files.
  • Accounts with fixed folders put the folder in the public ID; accounts with dynamic folders use it as the asset folder and as the start of the public ID. Both work.

Questions

Do I need a paid Cloudinary plan?

No. The free plan works for testing and for small sites. Watch the storage and bandwidth of your plan as the uploads grow.

Does the add-on work with the new Gravity Forms 3 and with older versions?

It supports Gravity Forms 2.9 and newer and is tested with Gravity Forms 3.1.2 on PHP 8.3 and Gravity Forms 2.9.8 on PHP 7.4.

Can I send videos and PDFs, or only images?

Everything a File Upload field accepts. The kind of file is detected automatically; only images and video accept a transformation in the link, and other files get the plain link.

Where is my API secret kept?

Encrypted in the WordPress database, or in a constant in wp-config.php if you prefer. It is never shown after saving and never written to notes or logs.

Can the add-on delete files in Cloudinary?

No. It only uploads. Deleting an entry never touches your Cloudinary account.

Get started

The Gravity Forms Cloudinary Premium Add-on sends every Gravity Forms upload to your own Cloudinary account with signed uploads, optional transformations and the CDN link saved in the entry. See the features, the price and the setup guide on the add-on page.

See the Cloudinary add-on

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