Site logo

[Resolved] Inline SVG icon causes LCP on desktop

Home Forums Support [Resolved] Inline SVG icon causes LCP on desktop

Home Forums Support Inline SVG icon causes LCP on desktop

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #2530541
    George

    Any chance I could have some pointers as to why there are LCP issues on desktop on the URL attached? Main one seems to be caused from an inline headline SVG icon further down the page.

    #2531091
    Fernando
    Customer Support

    Hi George,

    Can you try uploading the fonts you have locally? Currently, that’s the only thing I see changing while manually looking. It’s not causing a shift though. Can you check if it somehow helps?

    #2533424
    George

    Ok, I’ve uploaded local fonts but same issue . From a scan I did at https://www.webpagetest.org I got the result attached but I am not sure what to make of it. Maybe it can make sense to you?

    #2533522
    Ying
    Staff
    Customer Support

    Hi George,

    Just did a lighthouse test, and your site doesn’t seem to have LCP issue on the desktop:
    https://www.screencast.com/t/TNWUWrRa

    I also checked the report you attached, when I hover over the images, I don’t see a layout shift, do you?

    #2533571
    George

    Hmmm, I keep seeing it, strange. Like the black red frame when you hover over the image. CLS shows as 0.763 on desktop. Lighthouse test doesn’t show it but the pagespeed.web.dev, GMetrix and webpagetest.org tests all show it. I’ve attached screenshots. Can you replicate it?

    #2533962
    David
    Staff
    Customer Support

    Hi George,

    in my dev tools i see that fonts are using display: swap and there is a tiny amount of FOUT occurring.
    If you can set the font display to auto

    #2534064
    George

    I am using local fonts and the setting in the LiteSpeed cache is Default (there are two options for font display, default and swap). I’ve reuploaded fonts with display-auto, same issue.

    #2534099
    David
    Staff
    Customer Support

    2023-02-15_13-43-11

    That img has no width or height attributes, so the browser can’t reserve space for it.
    So it relies on that CSS to resize it to 300px. And that CSS is not included in the critical CSS that litespeed is loading in the head of your doc..

    Best fix is to make sure the image does have width or height attributes that are exact match so the CSS isn’t required.

    Also the Litespeed inline CSS doesn’t have all the above the fold styles, so the FOUT is fixed but the font is still be resized.

    #2534427
    George

    Switched back to a core image block since a GB image block doesn’t allow width and size attributes. That’s how it was before, didn’t fix the issue.

    #2534441
    David
    Staff
    Customer Support

    Can you disable Litespeed and any other optimizations ?

    #2534455
    George

    Done.

    #2534462
    David
    Staff
    Customer Support

    And now the CLS is almost 0

    https://www.webpagetest.org/vitals.php?test=230215_AiDcQ5_ENX&run=2&cached=0#cls

    Its Litespeed messing with the CSS and creating a poor Critical CSS that seems to be the cause

    #2534478
    George

    I disabled Load CSS Asynchronously from LiteSpeed, problem solved.

    Thanks David!

    #2534516
    George

    It started doing it again, I’ve had enough with this, though, thanks again.

    #2535359
    David
    Staff
    Customer Support

    All optimizers that try to automatically create create critical css and async load the remaining css generally end up messing something up. Might be worth checking with Litespeed support, as their config looks super complex.

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