I have a large image in the header of a client's site. I am using @astrojs/image's <Picture> component to serve avif, webp.... Although I am setting a aspectRatio on the <Picture> , Google Lighthouse is saying the image has no height/width on it, giving a fair hit to my performance score.
GitHub code — https://github.com/frankstallone/loumarc-astro/blob/main/astro/src/pages/index.astro#L35
Code used
<Picture
src={headerImg}
widths={[520, 700, 2000]}
aspectRatio={2000 / 631}
alt="Amazon trusts Loumarc Signs to create their signs"
loading="eager"
quality={80}
format="avif"
/>
This particular image needs to be responsive. I'll add that the only real difference between this and other uses of <Picture> on this page is the added loading="earger" since it's relevant for this image.
What do I need to do to get Google Lighthouse to be okay with the width and height of this image?