🎉 Celebrate with 10% OFF on All Products! Use Code: GFEX10 Or Buy Any 2+ Items for 30% OFF with Code: GFEX30!

Gravity Forms Image Moderation Premium Add-on Setup Guide

Updated 11 min read Gravity Forms Integrations A–Z
On this page
  1. Video walkthrough
  2. What You Get
  3. Requirements
  4. Privacy: Images Are Sent to the Provider
  5. Step 1: Install and Activate the License
  6. Step 2: Choose a Provider and Save Its Keys
  7. Amazon Rekognition
  8. Sightengine
  9. Google Cloud Vision SafeSearch
  10. Step 3: Set the Thresholds
  11. Step 4: Choose What Happens to an Unsafe Image
  12. Reject the submission
  13. Accept the entry and flag it
  14. Accept, flag and blur the image
  15. A different action for one form
  16. Step 5: Decide What Happens When the Provider Is Down
  17. Which Fields and Forms Are Checked
  18. Large Images and the Later Check
  19. Merge Tags and the Notification Event
  20. The Log
  21. Troubleshooting
  22. Frequently Asked Questions
  23. Does the add-on work without an account with a provider?
  24. Can I use two providers at once?
  25. Does it stop illegal images?
  26. Is the image stored at the provider?
  27. What happens when I deactivate the license?
  28. What does uninstall remove?

Video walkthrough

Gravity Forms Image Moderation Add-On Setup Guide: Rekognition, Sightengine, Vision (WordPress Side)
Video setup guide: Gravity Forms Image Moderation Watch on YouTube

The Gravity Forms Image Moderation Premium Add-on checks every image that a visitor sends through a File Upload field before the entry is saved. If an image looks unsafe, you decide what happens: the form is not submitted and the visitor sees a message that you wrote, or the entry is accepted and flagged for your team, or the stored image is blurred. The checking is done by the provider you choose: Amazon Rekognition, Sightengine or Google Cloud Vision.

A Gravity Forms photo contest form after a flagged image was sent: a red box says there was a problem and the Photo field shows the message that the image looks unsafe
A flagged image is refused with the message you wrote, and it is not listed again on the form.

A photo contest, a profile form, a classified ad, a user gallery: every form that takes pictures from strangers sooner or later receives something you do not want on your site. Reading each upload by hand does not scale, and the text moderation that comes with Gravity Forms never looks at a picture. This add-on closes that gap without changing how your forms look. Safe images go through as before, and an unsafe one is dealt with at the form, at the moment it is sent.

What You Get

  • Three providers, chosen in the settings, each with a Test connection button that sends one plain gray picture made by the add-on. Nothing unsafe is ever used for testing.
  • Amazon Rekognition: the add-on signs its own requests with AWS Signature Version 4 from your access key, secret key and region. No AWS software package is needed.
  • Sightengine: with the models you pick, from nudity and weapons to drugs, gore, hate symbols and offensive text inside the picture.
  • Google Cloud Vision SafeSearch with a simple API key.
  • A threshold for every category: nudity, suggestive content, violence, weapons, drugs and tobacco, hate symbols, offensive gestures and text. A number from 0 to 100; 0 switches the category off.
  • Three actions: reject the submission with your message, accept and flag the entry, or accept and blur the stored image.
  • Per form and per field switches, and a form can have its own action.
  • JPG, PNG, WebP and GIF. WebP and GIF are converted, large images are shrunk to the limit of the provider, and the stored original is never changed unless you choose blur.
  • A policy for a provider that is down or slow, with your own time limit.
  • The merge tags {image_moderation_status} and {image_moderation_labels}, the notification event Image flagged, an entry note, a log and encrypted keys.

Requirements

  • WordPress 6.5 or newer, PHP 7.4 or newer, Gravity Forms 2.9 or newer (tested on 2.9 and 3.1).
  • An account with the provider you choose. The add-on does not include any checking service; you pay the provider for what you send, under the terms of the provider.
  • OpenSSL with AES-256-GCM, which almost every host has. The keys are stored encrypted.
  • Optional: Imagick or GD. Without one of them only JPEG and PNG images that already fit the size limit can be checked, and the blur action is not available. The settings screen shows what your server has.

Privacy: Images Are Sent to the Provider

Read this before you switch the add-on on. To check a picture, the add-on sends the picture itself to the provider you choose, over HTTPS. For a very large or unusual image it sends a resized or converted copy. The terms and the privacy policy of that provider apply to the image. Nothing is sent until you choose a provider, save its keys and leave the form switch on. The add-on stores no copy of an image: the log keeps the file name, the form number, the provider and the category scores, and a short cache keeps only the SHA-256 fingerprint of an image with its scores for a few hours. Add a sentence to your own privacy policy and, where the law asks for it, tell your visitors that uploaded images are checked by an outside service. The settings screen carries the same text, and the add-on adds it to the privacy policy guide of WordPress.

Step 1: Install and Activate the License

  1. Upload the plugin zip under Plugins, Add New, and activate it.
  2. Open Forms, Settings, Image Moderation and enter your Gravity Extra license key.
  3. Look at the box Requirements and status. A tick means the item is fine. If it says that no provider is chosen yet, that is the normal state after the installation: nothing is checked yet.

Step 2: Choose a Provider and Save Its Keys

Pick the provider in the list. The keys are saved with their own Save and Remove buttons, they are stored encrypted, and after saving only the last four characters are shown. Press Test connection to check the choice with the options on the page as they are now.

The Provider settings of the Image Moderation add-on: the provider choice, the AWS region, the Sightengine models, the key boxes with their saved hints and the Test connection result
The provider settings with the key boxes and the result of Test connection.

Amazon Rekognition

Create an IAM user in your AWS account that may call only rekognition:DetectModerationLabels, create an access key for it and paste the access key ID and the secret access key. Choose the AWS region where you want the images to be processed. Rekognition accepts JPEG and PNG and up to 5 MB per image sent with the request; the add-on converts WebP and GIF and shrinks larger images for you. Offensive text inside a picture is not part of Rekognition moderation; use Sightengine for that.

Sightengine

Paste the API user and the API secret of your Sightengine account. The field Sightengine models holds a comma separated list. The add-on knows nudity-2.1, weapon, violence, gore-2.0, recreational_drug, offensive-2.0 and text-content-2.0. Each model in the list counts in your Sightengine plan, so keep only the ones you need. The model text-content-2.0 reads text inside the picture and is the one that feeds the category Offensive gestures and text.

Google Cloud Vision SafeSearch

Enable the Cloud Vision API in a Google Cloud project with billing, create an API key, restrict it to that API if you can, and paste it. SafeSearch gives five levels instead of a percentage: very unlikely, unlikely, possible, likely and very likely. The add-on counts them as 5, 25, 50, 75 and 95 against your thresholds. SafeSearch has the categories adult (nudity), racy (suggestive) and violence; it does not look for weapons, drugs or hate symbols.

Step 3: Set the Thresholds

Under Category thresholds every category has a number from 0 to 100. An image counts as unsafe in a category when the provider reports at least that confidence. A lower number catches more but raises more false alarms; a higher number does the opposite. About 60 is a good start. A threshold of 0 switches the category off, which is the default for suggestive content so that beach and sport photos are not stopped.

Category Amazon Rekognition Sightengine Google SafeSearch
Nudity and sexual content Explicit labels nudity-2.1: sexual activity, sexual display, erotica adult
Suggestive content Non-explicit nudity, swimwear, underwear, kissing nudity-2.1: very suggestive, suggestive racy
Violence, gore and disturbing scenes Graphic violence, blood, corpses, explosions, self-harm violence, gore-2.0 violence
Weapons Weapons weapon: firearm, knife not offered
Drugs and tobacco Drugs and tobacco labels, pills, smoking recreational_drug not offered
Hate symbols Hate symbols, extremist, supremacy offensive-2.0: nazi, confederate, supremacist, terrorist not offered
Offensive gestures and text Rude gestures middle finger and text-content-2.0 for text in the image not offered

Labels the add-on does not use, such as alcohol and gambling, are ignored. If a category is not offered by your provider, its threshold has no effect.

Step 4: Choose What Happens to an Unsafe Image

Reject the submission

This is the default. The field fails validation with your message, the temporary file is deleted, the image is not listed again on the form, no entry is saved, and the event is written to the log. With the multiple file uploader only the unsafe image is removed. On a form with several pages the visitor is stopped on the page where the image was sent.

Accept the entry and flag it

The entry is saved and the image is kept as it was sent. The entry gets a note such as Image moderation: summer-market.jpg: Flagged – Nudity and sexual content 93%, the entry meta Image moderation shows Flagged, and the notification event Image flagged is sent with the real entry. Under A flagged entry is you choose whether it is starred and kept unread, marked as spam, or left as it is.

A Gravity Forms entry screen with the Notes box showing the note Image moderation: summer-market.jpg: Flagged - Nudity and sexual content 93%
A flagged entry carries a note with the categories and their scores.

Accept, flag and blur the image

Like flagging, and in addition the stored file is replaced by a blurred copy with the same name, the same format and the same size in pixels. The visitor never sees the difference; your team opens the entry and sees a blurred image and the note. Blurring needs Imagick or GD. If your server has neither, the entry is flagged and the note says that the image could not be blurred.

A different action for one form

Open the form, then Settings, Image Moderation. Action for an unsafe image in this form overrides the global action, for example to reject on the public contest form and only flag on an internal form.

Step 5: Decide What Happens When the Provider Is Down

Providers have outages, accounts run out of credit and networks time out. If the provider is down, too slow or cannot check the image has two choices. Allow the submission and flag the entry as not checked is the default: the visitor is not punished, the entry says Not checked with the reason, and the log keeps a line. Block the submission shows your second message instead. The Time limit is the number of seconds the visitor waits for the provider, from 1 to 60.

Which Fields and Forms Are Checked

  • Every form with a File Upload field is checked once the add-on is set up. Switch a form off under Form Settings, Image Moderation.
  • Every File Upload field is checked by default. In the form editor open the field, go to the Advanced tab and untick Check images with Image Moderation to exclude one field.
  • Only images are checked: jpg, jpeg, png, webp and gif. A PDF or a text file in the same field is left alone and is never sent to the provider. For a GIF the first frame is checked.
  • Single uploads, the multiple file uploader and images sent on an earlier page of a multi-page form are all covered. An image checked on one page is not checked again when the last page is submitted.

Large Images and the Later Check

Images larger than the limit of the provider are shrunk before they are sent, and the stored image is never changed by that. If you prefer that a visitor never waits for a big photo, switch on Check large images after the entry is saved and set the size from which an image counts as large. The entry is saved as Pending check, WordPress asks the provider in the background, and the result is written to the entry. A flagged image is then treated like the action you chose; with reject the stored image is removed, because a saved entry cannot be refused any more. A provider that does not answer is asked again, up to three times, and then the entry says Not checked.

Merge Tags and the Notification Event

  • {image_moderation_status} prints Clean, Flagged, Rejected, Flagged (blurred), Pending check, Not checked or No image. It works in confirmations and notifications.
  • {image_moderation_labels} prints the categories with their percentages, for example Nudity and sexual content 93%, or None.
  • The notification event Image flagged is available when you add a notification. It is sent when an image is rejected and when an entry is flagged, with both merge tags filled in. For a rejected submission no entry exists, so the notification carries the form and the date only.
  • The optional alert address in the settings gets a short e-mail for the same events.

The Log

The last 200 events are kept in a table in the settings: time, form, file name, categories with their percentages, provider and what happened. A log line never contains an image or the text of a label list, and the keys are never written to it. Use Clear the log to empty it.

Troubleshooting

What you see What it means
AWS does not know this access key or the secret is wrong The access key ID or the secret was pasted wrongly, or the key was deleted in AWS.
AWS rejected the signature The secret is wrong, or the clock of your server is more than a few minutes off.
AWS refused access The IAM user does not have the permission rekognition:DetectModerationLabels, or the region is not enabled for your account.
Sightengine refused the API user or secret Check both values in your Sightengine dashboard.
Your Sightengine plan does not include one of the chosen models Remove that model from the list.
Google refused the API key The Cloud Vision API is not enabled, billing is off, or the key is restricted to another API.
Not checked (provider unavailable) The provider did not answer in time or answered with an error. The log line says which.
The image could not be blurred The server has neither Imagick nor GD.

Frequently Asked Questions

Does the add-on work without an account with a provider?

No. It decides what to do with an image, and the provider tells it what the image shows. Choose one of the three and enter its keys.

Can I use two providers at once?

One provider is active at a time. You can change it in the settings whenever you like; results are cached per provider.

Does it stop illegal images?

No automatic check is complete. Moderation services state that they do not detect every kind of unwanted or illegal content. Use the add-on as a filter that lowers the work of your team, not as a guarantee, and follow the rules that apply to your site.

Is the image stored at the provider?

That depends on the provider and on your account settings with it. Read their terms before you choose.

What happens when I deactivate the license?

Like every Gravity Extra premium add-on, the checking stops until the license is active again.

What does uninstall remove?

The options, the encrypted keys, the log and the per-form settings. Entries, notes and entry meta stay.

Still need help?

Our support team answers tickets every day, usually within a few hours.

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