• Resolved simonc17

    (@simonc17)


    When I add esi to a shortcode all images in the dynamically generated cards are no longer lazy loaded which produces an issue in page speed test and a drop in page performance.

    I can see this quite clearly when inspecting each card’s image. Before I add esi I get data-lazyloaded=”1″ and no issue raised by google page speed test and after adding esi I get no data-lazyloaded definition and a page speed test issue.

    Is there some way to enable lazyloading when using esi?

    Thanks.

    • This topic was modified 1 year, 3 months ago by simonc17.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support qtwrk

    (@qtwrk)

    yes, it’s due the nature of ESI , and the way how ESI works , it is a sub-request generated/processed after the main request is sent/rendered by browser , so by that point , all the page optimization process is finished

    Is there some way to enable lazyloading when using esi?

    Don’t care about missing lazy load if ESI is used. Just add

    loading="lazy" attribute

    to the affected img tag and image lazy load is back. LiteSpeed’s lazy load is deprecated since years and can only be used if a theme doesn’t support native lazy load function of every modern browser. Also, the native lazy load doesn’t need extra Javascript to work.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘ESI shortcode doesn’t support lazy loading?’ is closed to new replies.