Support » Plugin: Autoptimize » Google Map not rendering

  • Resolved basnetsamriddhi

    (@basnetsamriddhi)


    The google map is not rendering after activation of autoptimize plugin is added.

    I have tried few options from mentioned in few of the previous queries, but that doesnot seem to be have any effect on the site.

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    Can you first and foremost try to identify what is breaking things by just disabling CSS or JS or HTML or Image optimization (incl. lazyload)?

    frank

    Thread Starter basnetsamriddhi

    (@basnetsamriddhi)

    I tried disabling JS CSS and HTML but the problem seems to be the option in image tab
    https://prnt.sc/swcaa0
    As I make a selection of this option the map on the site seems to not render properly.

    Can you tell me how to make this work, as the option holds a significant role for the site.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    you can use this code snippet to disable lazyload on only the contact page:

    
    add_filter('autoptimize_filter_imgopt_should_lazyload','should_lazyload_context',10,2);
    function should_lazyload_context($flag, $context) {
      if ( strpos( $_SERVER['REQUEST_URI'], '/contact-us' ) !== false ) {
        return false;
      } else {
        return $flag;
      }
    }
    Thread Starter basnetsamriddhi

    (@basnetsamriddhi)

    Thanks a lot that seems to help the rendering the map

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    you’re welcome, feel free to leave a review of the plugin and support here! 🙂

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Google Map not rendering’ is closed to new replies.