Lazy load

New home › Forums › Basic Version › Lazy load

  • This topic has 2 replies, 3 voices, and was last updated 1 month ago by bongamodels.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #86268
    crush009
    Participant

    Is there a way to lazy load the Google Maps API only when the map enters the viewport?

    I have a one-page WordPress website with a WP Go Maps map on the homepage. GTmetrix shows that maps.googleapis.com/maps/api/js adds about 337 KB on the initial page load.

    I would like the page content (hero, text, images) to load first and initialize the map only when the user scrolls to the map section.

    Is there a built-in option or recommended method to defer the map loading?

    #86280
    Matthew
    Moderator

    Hi there,

    Thank you for getting in touch with us, we do appreciate your time.

    Unfortunately we do not have deferral for the Google Maps API instance loading, however, may I ask if you have tried using the “Enable async loading API parameter” setting (Maps -> Settings -> Advanced) as this allows the API to be loaded asynchronously thus preventing it from blocking your page’s render time?

    I hope this helps?

    Kindest Regards,
    Matthew

    #86621
    bongamodels
    Participant

    Hello!

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.