Why is my View slow to load?
We have found two leading causes that can impact View loading times on the front end:
Encryption plugins like Gravity Forms Encrypted Fields or similar plugins can significantly impact View loading times.
Encrypting and decrypting values are very slow tasks (on purpose!). This doesn't pair well with fast load times on the front end.
Gravity Forms Secure File Download Location
Gravity Forms hides the true path (location) of uploaded files for security purposes. This makes sense; however, this is known to severely impact View loading times, especially if your View displays lots of images.
The path for secure file locations contains the
?gf-download parameter on the URL, like this:
Insecure file locations, on the other hand, will load files directly from their path, like this:
...which will greatly improve image loading times.
Note how the secure link doesn't show the file's name, but the insecure link does.
Adding the code below will direct GravityView to use the insecure path to the image when displaying it.
add_filter( 'gform_secure_file_download_location', '__return_false' );
If you want to make the file URLs visible for only one form, you can use this code instead (replacing
FORM_ID with the form ID.)
add_filter( 'gform_secure_file_download_location_FORM_ID', '__return_false' );
As with all our code samples, here's how to add the code to your site.