Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter devonator

    (@devoantor)

    I have noticed that if I put the image in a template part, then it will lazy load. This seems very odd and could be a bug. I remember in WordPress 6.1.1 there was this bug with the shortcode block, but it was resolved in 6.1.2

    I had the same issue but in my case the following change in WordPress 6.3 was the cause:
    “the default value for the wp_omit_loading_attr_threshold filter has been modified from 1 to 3”
    If you have just a few images on your homepage, perhaps this is the cause?

    I added a filter for wp_omit_loading_attr_threshold to change the value of the treshold for specific page types (home, category, single post, single page, etc.) as it varies wildly per website, and even per page type, what the best value is for the treshold.

    • This reply was modified 1 year, 2 months ago by gggshine999.

    Note that the first three images will omit lazy loading intentionally most of the time. The site you linked seems to be offline, so we can’t look at any specifics to determine if this is the case.

    Thread Starter devonator

    (@devoantor)

    @courtneypk Yes, site is offline now. Was a temp website.

    I understand that WordPress omits lazy loading from the header template part/content above the fold, but it wouldn’t work anywhere within the full site editor front page template until I put all the body content within a template part. Seems like a WordPress bug. It shouldn’t be required for front page template body content to be within a template part for lazy loading to work.

    @devoantor If you’d like to report a bug, please see this page: https://make.www.ads-software.com/core/handbook/testing/reporting-bugs/

    Thread Starter devonator

    (@devoantor)

    @courtneypk thank you. I have submitted a ticket around the same day I made this post.

    Hello @devoantor,

    Did you find a solution for this issue ? Having the same problem, I can’t find the origin of this issue and how to solve it.

    Thank you very much !

    Thread Starter devonator

    (@devoantor)

    @swantje the solution is to make sure all content in the template is wrapped with a template part.

    How I did this was just the header template part, all my body content is within a template part, and the footer template part.

    Hi @devoantor

    thanks a lot for your answer. i’m happy that you figured out a solution for you.

    I’ve got the header part, main and footer. WIthin the main, there are about 30 photos and the fetchpriority=”high” is working on the 18th photo, far under “the above the fold”. The first 17 photos got no fetchpriority nor lazyload. So I still have to search why it does that. Strange behaviour.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘WordPress Image Lazy Loading not Working 6.3’ is closed to new replies.