Skip to content

Commit 03f127b

Browse files
committed
Apply hero logo fetchpriority/eager/async to the mobile variant too
The previous perf commit only updated the desktop logo <img> (.cs-hero-image-large, visible at ≥1024px). The mobile sibling (.cs-hero-image-inner, the LCP candidate on phones) was missed because its indent differs, so phones were rendering the plain <img src alt> with default priority/decoding. Both <img>s point at the same URL, so this doesn't add a network request — it just ensures the priority/decoding hints apply regardless of which variant the viewport activates.
1 parent da3efe8 commit 03f127b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/components/CaseStudy/CaseStudyDetailHero.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const { category, heading, paragraphs, logo, logoAlt, backgroundImage } = Astro.
1818
<h1 class="cs-hero-heading">{heading}</h1>
1919
<div class="cs-hero-image-inner" style={`background-image: url('${backgroundImage}')`}>
2020
<div class="cs-hero-logo-wrap">
21-
<img src={logo} alt={logoAlt} />
21+
<img src={logo} alt={logoAlt} fetchpriority="high" loading="eager" decoding="async" />
2222
</div>
2323
</div>
2424
{paragraphs.map((p) => <p class="cs-hero-paragraph" set:html={p} />)}

0 commit comments

Comments
 (0)