• Resolved colinharzing

    (@colinharzing)


    Hi,

    I have an issue with lazy loading and this plugin. I read in some older posts that there wasn’t really a work around then, is there a fix now?

    Greetings,

    Colin

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

Viewing 1 replies (of 1 total)
  • Plugin Author Benbodhi

    (@benbodhi)

    Hi there,

    Indeed this should be an easy thing to fix.

    I use the new native lazy loading attributes to make sure the image loading is set to eager. This makes sure the SVG file is loaded before my plugin script comes by to replace the IMG with the SVG source.

    You just use loading="eager" in your IMG tag.

    For example:
    <img src="path/to/your/file.svg" loading="eager" class="style-svg" />

    That should do the trick.

    You can read more about it here: https://addyosmani.com/blog/lazy-loading/

    Let me know if I’ve misunderstood.

Viewing 1 replies (of 1 total)
  • The topic ‘Lazy loading fix?’ is closed to new replies.