Skip to content

Commit 78add85

Browse files
authored
Merge pull request #120 from SOPT-all/refactor/119-home-banner-lcp
[REFACTOR] 홈 배너 LCP 이미지 로딩 최적화
2 parents ddc9db7 + 6260b39 commit 78add85

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

index.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@
2828
as="font"
2929
type="font/woff2"
3030
crossorigin="anonymous" />
31+
<link
32+
rel="preload"
33+
href="/src/shared/assets/images/img-home-banner.png"
34+
as="image"
35+
fetchpriority="high" />
3136
</head>
3237
<body>
3338
<div id="root"></div>

src/pages/home/components/banner/HomeBanner.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ export const HomeBanner = ({href, className, ...props}: HomeBannerProps) => {
2222
alt='빠른 배송이 필요할 땐 오늘 구매하면 내일배송'
2323
width={375}
2424
height={100}
25+
loading='eager'
26+
fetchPriority='high'
2527
className='h-full w-full object-cover'
2628
/>
2729
</a>

0 commit comments

Comments
 (0)