Fix lightbox links not being added to images

Version 2.1.1 of GravityView added security improvements that affect the lightbox GravityView uses.

GravityView supports Gravity Forms secure download locations, which hides where a file has been uploaded. This is good for security, but it affects how the lightbox script works.

Option 1: Use a different lightbox script

GravityView uses the default WordPress lightbox script, called Thickbox. Thickbox doesn't support these secure links, but other lightbox scripts do. 

Follow this doc to use the FooBox script.

Option 2: Disable the secure paths when displaying GravityView images

In order to use lightbox script with images in GravityView, add the following code to your theme's functions.php file:

add_filter( 'gravityview/fields/fileupload/allow_insecure_lightbox', '__return_true' );

Adding the code above will direct GravityView to use the insecure path to the image when displaying it. Note how the secure link doesn't show the name of the file, but the insecure link does:

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.