[Smush Pro] Smush Lazy load doesn't work with: AMP for WP – Accelerated Mobile Pages

Hello,

We are using Smush Pro in our website and the lazy load feature is breaking the frontend of the site. Wp-admin is working normally.

The lazy load is working as it should on our testing environment (https://wpdev.rantapallo.fi), but not in the live site (https://www.rantapallo.fi).

The live site is on two mirrored servers.

Here is the error log trace:

[07-Aug-2019 12:20:57 UTC] PHP Fatal error: Uncaught Error: Call to a member function get() on null in /var/www/www.rantapallo.fi/wp-includes/query.php:28

Stack trace:

#0 /var/www/www.rantapallo.fi/wp-content/plugins/accelerated-mobile-pages/includes/vendor/amp/includes/amp-helper-functions.php(44): get_query_var('amp', false)

#1 /var/www/www.rantapallo.fi/wp-content/plugins/wp-smush-pro/core/modules/class-wp-smush-lazy-load.php(64): is_amp_endpoint()

#2 /var/www/www.rantapallo.fi/wp-content/plugins/wp-smush-pro/core/modules/abstract-wp-smush-module.php(36): WP_Smush_Lazy_Load->init()

#3 /var/www/www.rantapallo.fi/wp-content/plugins/wp-smush-pro/core/modules/class-wp-smush-lazy-load.php(42): WP_Smush_Module->__construct()

#4 /var/www/www.rantapallo.fi/wp-content/plugins/wp-smush-pro/core/class-wp-smush-modules.php(99): WP_Smush_Lazy_Load->__construct(Object(WP_Smush_Page_Parser))

#5 /var/www/www.rantapallo.fi/wp-content/plugins/wp-smush-pro/core/class-wp-smush-core.php(299): WP_Smush_Modules->__construct()

#6 /var/www/www.rantapallo.fi/wp-content/plugi in /var/www/www.rantapallo.fi/wp-includes/query.php on line 28

Thank you very much in advance!