🎉 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 Photo Uploads to a Responsive Lightbox Gallery

GravityExtra
How to Send Gravity Forms Photo Uploads to a Responsive Lightbox Gallery

A photo contest, a community wall, a school open day, a real estate photo drop, a wedding guest gallery: every one of them starts with a form where people send pictures and ends with a gallery on your site. Gravity Forms is very good at the form. Responsive Lightbox and Gallery is a popular, free way to show those pictures in a grid or a slider and open them in a lightbox. The part in the middle, getting each uploaded picture from the entry into the right gallery, is where most sites fall back on downloading files and adding them by hand. This guide shows how to automate it, step by step.

Why the form and the gallery do not talk to each other

Gravity Forms saves an uploaded file in its own folder inside the WordPress uploads directory and keeps the address of the file in the entry. A gallery of the plugin works differently: it is a list of Media Library image numbers, with the layout and lightbox settings kept next to it. A file that sits only in the Gravity Forms folder is not a Media Library image, so the gallery cannot show it, and nothing adds it to a gallery list for you.

Doing that by hand is more fragile than it looks. A correct import has to copy the file under a safe name, create the Media Library item, let WordPress build the thumbnail sizes, store the title, the alt text and the caption, and only then add the item to the gallery and refresh the count. Get one of those wrong and the gallery shows a blank tile or a broken link. It is also slow when fifty people send pictures on the same evening.

What you will build

  • A form with a File Upload field, a name and a caption.
  • A drop-down that lists your galleries, so the visitor chooses where the picture goes.
  • A rule that copies each picture into the Media Library, names it from the form and adds it to the gallery.
  • An approval step, so nothing reaches a public gallery before you have looked at it.
  • A confirmation that tells the visitor which gallery their picture went into.

Step 1: install the three plugins

You need Gravity Forms, the free Responsive Lightbox and Gallery plugin from WordPress.org and the Gravity Forms Responsive Lightbox Gallery Integration Premium Add-on. Activate them in that order, then open Forms → Settings → Responsive Lightbox and enter your license key. The add-on needs version 2.7 or newer of the plugin, with its gallery builder switched on, and Gravity Forms 2.9 or newer. It shows a notice if either is missing.

Create at least one gallery under Gallery in the WordPress menu, or let the add-on create galleries for you in step 3. An empty gallery is fine.

Step 2: make the form

Create a form with these fields: a Single Line Text field called Your name, a File Upload field called Your photo, a Drop Down called Gallery, a Single Line Text field called Caption and one called Describe the photo. If visitors may send several pictures, switch on the multiple file uploader in the File Upload field and allow only picture types: jpg, png, gif and webp. Leave the choices of the drop-down empty; the add-on fills them with your galleries.

A Gravity Forms photo contest form with the fields Your name, Your photo, Gallery (a drop-down filled with the Responsive Lightbox galleries), Caption and Describe the photo
The visitor picks the gallery from a drop-down that lists your Responsive Lightbox galleries.

Step 3: add the Responsive Lightbox feed

Open the form, then Settings → Responsive Lightbox → Add New. Name the feed, keep the upload field ticked and set Gallery to The gallery the visitor picks in a form field. Choose the drop-down as the gallery field. Then open the box Choices and select the same drop-down in List the galleries in this field. From now on the form lists your galleries by name.

Think about who may pick what. If only some galleries are open to the public, leave the others out with Never these galleries. The add-on uses the same list to check the answer when the form is sent, so a visitor who edits the page and sends the number of a gallery that is not in the list gets nothing added. Galleries that take their images from Folders, Featured Content or the Remote Library are never offered.

The Responsive Lightbox feed settings: the File Upload field, the gallery choice, the choices boxes, the image details with merge tag buttons, the approval and the condition
The feed settings: which gallery, the image details and the approval step.

Step 4: title, alt text and caption

Pictures called IMG_4032 do nobody any good. In Image details use the merge tag button at the right of each box to build the text. A title such as {Your name:1} – {filename} gives every picture the name of the sender. The alt text can come from the field where the visitor describes the photo, which helps people who use a screen reader and helps search engines. The caption can use the Caption field or a sentence with the entry number. If you leave a box empty, the file name is used as the title and the title as the alt text.

The extra tokens {filename}, {index} and {entry_id} work in all three boxes. With several pictures in one entry, {index} numbers them 1, 2, 3, which is handy when the title must be unique.

Step 5: choose the approval rule

When visitors can add pictures to a public gallery, someone has to look at them first. Set Approval to hold the images. The pictures are copied into the Media Library but nothing is added to the gallery, so no gallery shows them yet. Be aware that a file in the Media Library has an address, so for strict privacy keep the form for people you trust or use the approval together with your normal moderation habits.

Open an entry in Forms → Entries. A box called Responsive Lightbox shows the status, a link to the gallery and every picture as a thumbnail. Two buttons decide. Approve images adds the pictures to the gallery, publishes a gallery that was made as a draft and sends a notification event that you can use for an e-mail to your team or to the visitor. Reject images deletes the pictures from the Media Library and sends the rejected event. Both buttons need the right to edit entries and a security token.

The Responsive Lightbox box on a Gravity Forms entry screen: status Waiting for approval, a link to the gallery, two thumbnails and the buttons Approve images and Reject images
The entry screen shows the images that were added, the gallery link and the approval buttons.

Giving every visitor a gallery of their own

Sometimes the visitor should not pick anything. A photographer portal, a class project or a real estate listing each want a gallery made for the person or the job. Set Gallery to A new gallery and type a name with merge tags, for example Open day {Your name:1}. Choose between a new gallery for every entry, one gallery per name (the add-on finds the gallery that already has that name and makes it only when it is missing) and one gallery per logged-in user.

The new gallery gets the gallery type you choose in the feed: the one set in the plugin settings, Basic Grid, Basic Slider or Basic Masonry. Everything else keeps the plugin defaults, and the author is the user who sent the form. You can also ask for a WordPress page that shows the gallery. The page holds the gallery shortcode, and its address is available as a merge tag for the confirmation.

The gallery in the editor of the plugin

A gallery that the add-on filled is a normal gallery. Open it in the editor of the plugin and the pictures are there, in the order they arrived, after any picture you placed by hand. The add-on never rewrites the images that are already in the gallery, so your order stays and an image you switched off stays switched off. You can sort the new pictures, change a design setting or edit an image caption, exactly as you would after uploading them yourself.

Merge tags for confirmations and e-mails

The add-on gives you the tags {rlg_gallery_id}, {rlg_gallery_url}, {rlg_gallery_name}, {rlg_image_count} and {rlg_status}. A confirmation can say that two pictures reached the gallery called Open day and link to the page. A notification to your team can carry the status, so a subject line such as Approved: {rlg_image_count} image(s) in {rlg_gallery_name} says everything at a glance. The entry list also gets columns and filters for the gallery number and the image status, so you can see all pending pictures in one view.

What about the extensions of the plugin?

The plugin has paid extensions that add more gallery types and sources. The add-on is built on the data format of the free plugin and was tested with the free plugin. It leaves the settings, the lightbox script and galleries that take their images from Folders, Featured Content or the Remote Library alone. If you use the extensions, the galleries you fill with the add-on are ordinary galleries there too.

Things worth knowing before you launch

  • Each picture exists twice on the server: the copy that Gravity Forms keeps for the entry and the copy in the Media Library, plus the thumbnail sizes WordPress makes. Plan your disk space for both and set a sensible file size limit on the upload field.
  • Reject deletes the Media Library copy for good. The entry keeps its own file.
  • Files that are not pictures are skipped and the entry note says so. A file that only pretends to be a picture is refused.
  • Without an active license key nothing is added. Activate the key before you open the form to the public.
  • Test the whole path once with your own picture: send the form, read the entry notes, approve and open the gallery.

Frequently asked questions

Can visitors send several pictures in one go?

Yes. Use the multiple file uploader of the File Upload field. The feed imports each picture and sets a limit per entry, from 1 to 50.

Do visitors need an account?

No. Anyone who can see the form can send pictures. The per user gallery rule needs a logged-in user, and visitors who are not logged in get a new gallery each time.

Will it work with my other gallery plugins?

The add-on works with Responsive Lightbox and Gallery only. It needs the free plugin from WordPress.org, version 2.7 or newer. Other gallery plugins have their own add-ons.

What happens to the original photo?

It stays untouched. WordPress imports a copy into the Media Library and makes its usual image sizes.

Is any data sent to another service?

No. Everything happens on your own server between Gravity Forms, WordPress and the gallery plugin.

Get started

The Gravity Forms Responsive Lightbox Gallery Integration Premium Add-on turns a Gravity Forms upload field into a front door for your Responsive Lightbox galleries, with the checks a public site needs. See the features, the price and the setup guide on the add-on page.

See the Responsive Lightbox Gallery 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