• Resolved W★

    (@filmpuls)


    Hi,

    images in the max mega sub-menu seem to be loaded even if the submenu is not visible? yellowlab.tools check reports:

    “These images are loaded by the browser even if they’re not visible. You might be able to find a way to lazy-load them, only when they get visible.”

    As I understand, lazy loading is native function of WordPress now, but it seems not be able to apply this function to images in the max mega menu submenu?

    thanks for advicing!
    K

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author megamenu

    (@megamenu)

    Hi W,

    Thanks for posting a link.

    The images within your sub menus do have the correct “loading=lazy” attribute (added by core WordPress), but, I believe, as they are “above the fold” (hidden or not) they will be loaded immediately regardless.

    Regards,
    Tom

    Thread Starter W★

    (@filmpuls)

    thanks for your explanation. speed is (almost) everything nowadays 🙂 any recommendation how to change this? is there a way to do it?

    Plugin Author megamenu

    (@megamenu)

    Hi W,

    Not easily, sorry.

    You’d need to custom code something, so that the images only get fully loaded once the sub menu appears. You can use the JavaScript API to detect when the sub menu opens:

    https://www.megamenu.com/documentation/javascript-api/

    Regards,
    Tom

    Thread Starter W★

    (@filmpuls)

    🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘WordPress 5.7. lazy load images submenu’ is closed to new replies.