[Support request] Disable Lazy load above the fold

Home Forums Support [Support request] Disable Lazy load above the fold

Home Forums Support Disable Lazy load above the fold

  • This topic has 7 replies, 3 voices, and was last updated 4 years ago by David.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1861812
    Sukalery

    Hello,

    How could I disable the featured image and site logo above the fold?

    I tried David code here:

    https://generatepress.com/forums/topic/high-lcp-loading-time/#post-1702740

    but somehow it disables lazy loading for the second image on the mobile screen, not the first one.

    Note: I use LiteSpeed cache plugin to lazy load all images.

    Thank you.

    #1862076
    Elvin
    Staff
    Customer Support

    Hi there,

    You’ll need to do that on Litespeed’s UI.

    I believe they have a lazy loading exclusion feature – https://docs.litespeedtech.com/lscache/lscwp/pageopt/#lazy-load-iframe-parent-class-name-excludes

    You’ll have to inspect the page and check the class name of the images (or the parent of the image) and include it on the exclusion field.

    #1862564
    Sukalery

    Hi Elvin, I see the classes in chrome inspecting tool:

    Logo: is-logo-image LiteSpeed-loaded

    First image: attachment-medium size-medium first-featured-image wp-post-image litespeed-loaded

    but when I exclude it in LiteSpeed plugin, lazy loading stops working for all images, except the logo.

    #1862661
    David
    Staff
    Customer Support

    Hi there,

    the code i provided in the other topic only applies to the Featured Images – it won’t work with an Image that has been added in the Page/Post Editor content.

    Instead you would need to select those images in the post editor, and in the Advanced > Additional CSS Class(es) field you can add your won CSS class eg. no-lazy

    then you can add that class to the Litespeed Lazy load exclusions list.

    #1863080
    Sukalery

    alright, I will do that.

    Edit: Can you tell what is the mobile logo default class?

    Thank you.

    #1863137
    David
    Staff
    Customer Support

    All logos have the is-logo-image including the mobile header.

    #1863196
    Sukalery

    Thanks, David, have a good day.

    #1864193
    David
    Staff
    Customer Support

    Glad to be of help!

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