Photos missing on 2 pages after gravity form plugin update [RESOLVED]

Received notice that Gravity Forms had automatically updated on a client website. Checked the website and the photos on the home page and contact page do not show. When logged into the back end and in edit mode, the images show up but once I save the page and view the site on the front end they are gone. However, some of the same photos appear on other pages. Only 2 of the 4 pages are affected.

Tried clearing the browser cache, and the cache in the optimizing plugin as well as Beaver Builder cache to no effect.

I deactivated the Gravity Forms plugin and the photos appeared correctly on the front end for the affected pages. As soon as I reactivated Gravity Forms the photos disappeared again. The website is

Hi there,

It looks like the image URL is corrupted. It could be caused by the SiteGround Speed Optimizer plugin. Please disable the plugin and let me know the outcome.

Viewing your page, I noticed the following JS error in the browser console:

Uncaught ReferenceError: gform is not defined

It also looks like the images are being lazy loaded by the theme or another plugin. The JS error is most likely preventing their script from running.

The latest Gravity Forms update did include a change to prevent the gform variable (aka the hooks script) outputting on every page by default because it impacts performance.

The page builder you are using won’t have updated their custom embed method for compatibility with that change yet.

Try adding the following to the theme functions.php file or a code snippets plugin:

add_filter( 'gform_force_hooks_js_output', '__return_true' );
1 Like

This functions.php filter worked for me on a page that wasn’t showing Gravity Forms (which had been working before today).

We released Gravity Forms 2.8.11 yesterday, which fixes this problem. Once you update, you will no longer need the filter.