#Largest Contentful Paint element Angular 17 - SSR Mobile

36 messages · Page 1 of 1 (latest)

chrome tapir
#

How can I optimize this part of the banner when it is mobile, however on desktop this does not happen even with a slightly heavier and larger image, I do not understand why it throws high LCP even though I use an image, I put preload in the index and I have the Angular's ngImage directives and the image is adapted to mobile size with an acceptable weight of approximately 50kb or less.
The domain is https://kids-gamarra.lat/
Using Angular 17.3.1 with SSR
https://pagespeed.web.dev/analysis/https-kids-gamarra-lat/w3o25ra4hm?form_factor=mobile

outer raptor
#

did you set width and height on tag img to prevent image shift ?

#

other thing is you cant use src attr with ngsrc attr

#

check out the reason

chrome tapir
#

Code in HTML

chrome tapir
#

then why pagespeed throw a LCP hight ? xd

outer raptor
#

fetchpriority attr looks incorrect and if you are using priority attr you dont need to added fetchpriority as well is redudant

#

but , make sure where this resources are hosted cause its may increase the lcp as well

chrome tapir
#

assets in the same server in assets folders of Angular , is stranger because with other image more resolution a size in desktop not show error

outer raptor
chrome tapir
outer raptor
#

dont exist height as value ...

chrome tapir
#

no always had a fetchPriority exist , yes not exist height or width because i use a fill true

#

i use fill because i need similiar behavior of css background in my banner

outer raptor
#

nope ...

outer raptor
chrome tapir
#

ahh i see

outer raptor
#

This value dont exist as well

#

You can delete this line since you are using priority attr…

chrome tapir
#

ok update with the next

#

add loading eager addicionally

outer raptor
#

Dont needs as well

#

read this

chrome tapir
#

oh interesting

#

same error with LCP with the corrections

#

i see angular add loading eager , fetchPriority high

outer raptor
#

So , your LCP tests in browser (desktop display) seems correct because the img tag are properly defined …

#

Your “sources” for mobile display not look good

#

If you really need to resize your image consider use this