A Gravity Forms upload can appear to hang even when the form configuration itself is correct. In one WordPress support case, a user repeatedly saw a spinning indicator after submitting an image upload, creating the impression that the form or image-processing setup was unreliable.
The confirmed cause was file-specific: the filename contained a percent sign (%), a reserved character that can cause problems in URLs, server handling, security layers, and post-processing. The custom image processor was hardened to sanitize risky filenames before upload. A separate earlier issue involved a file whose .jpeg extension did not match its actual PNG binary format; that type of mismatch was correctly rejected by WordPress and Gravity Forms security checks and was not bypassed.
Issue background
A WordPress site used Gravity Forms for image submissions. One user had reported multiple upload failures over time, including a persistent spinning wheel after submitting the form.
The investigation needed to distinguish among several possible causes:
- A recurring Gravity Forms configuration problem.
- User input or file-naming habits.
- File corruption or compatibility problems.
- Limitations in the custom image-processing workflow.
The form itself was configured to accept the image formats needed by the workflow, including JPG, JPEG, PNG, WEBP, GIF, HEIC, and HEIF.
Diagnosis
The most recent failed file contained a percent sign in its filename:
10% off with Golden Ticket.jpeg
The developer identified the % character as the immediate cause of that upload problem.
A percent sign is significant in URL encoding, so web servers, security tools, upload handlers, and image-processing code may treat it specially. A filename that appears normal to a user can therefore fail or stall later in the upload pipeline.
The investigation also reviewed an earlier failed file that had a different problem: it was named with a .jpeg extension, but its actual binary format was PNG.
That distinction matters because WordPress and Gravity Forms validate more than the filename alone. They can compare the extension, MIME type, and actual file contents. When those values do not agree, rejecting the file is expected security behavior rather than a broken form configuration.
The developer therefore classified the overall problem as file-specific compatibility issues rather than a recurring Gravity Forms configuration failure.
Resolution steps
The completed fix focused on making the upload process more forgiving of unsafe filenames while preserving normal security validation.
- Confirm the form’s allowed image types. Verify that Gravity Forms is configured to accept the formats the workflow genuinely needs.
- Inspect the exact failing filename. Do not assume every failed image has the same cause. Check for reserved or unsupported characters such as
%and other special characters. - Sanitize filenames before upload processing. The custom pre-upload flow was updated to normalize risky filenames automatically.
- Remove the reserved character from the problem file. For example, the original filename:
10% off with Golden Ticket.jpeg
was normalized to:
10-off-with-Golden-Ticket.jpeg
- Keep file-content validation intact. The enhancement did not override WordPress or Gravity Forms checks for mismatched extensions, MIME types, or binary formats.
- Treat extension/content mismatches separately. If a file is named
.jpegbut is actually encoded as PNG, correct or re-export the source file instead of weakening the server’s validation. - Retest with the previously failing upload. After the filename handling was added, the latest image upload completed successfully.
- Educate users on safe upload practices. Clear filenames and correctly exported image formats reduce the likelihood of edge-case failures, even when the upload system includes defensive sanitization.
The source task specifically describes the filename handling as an enhancement to make the workflow more resilient, rather than a repair to a fundamentally broken Gravity Forms configuration.
Final outcome
The custom image upload flow was updated to sanitize filenames containing risky characters such as %, and the previously failing image uploaded successfully afterward.
The site’s accepted image formats remained configured appropriately, while normal WordPress and Gravity Forms validation for mismatched file extensions and binary formats stayed in place.
The broader lesson is that recurring-looking upload failures may actually be different file-specific edge cases. When Gravity Forms accepts most images but certain files hang or fail, inspect the filename, extension, MIME type, and actual binary format before changing the form configuration.
If your Gravity Forms uploads are stalling, failing on particular images, or behaving inconsistently with custom image processing, contact Freshy. Our WordPress team can trace the upload pipeline, harden filename handling, and preserve the security checks that should remain in place.