Skip to content

Commit be299b5

Browse files
committed
⚡️ perf: optimize image loading in project cards
Enhance image loading performance by adding width, fit, quality, and format parameters to the urlFor function to optimize image delivery
1 parent 220f70f commit be299b5

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/components/Prosjekter/ProsjektCard.component.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,12 @@ const ProsjektCard: React.FC<Project> = ({
4444
<img
4545
className="transition-all duration-300 ease-in-out hover:-translate-y-1 hover:shadow-[0_2px_20px_rgba(60,255,60,0.35)]"
4646
width={600}
47-
src={urlFor(projectimage).url()}
47+
src={urlFor(projectimage)
48+
.width(600)
49+
.fit("max")
50+
.quality(100)
51+
.auto("format")
52+
.url()}
4853
alt={name}
4954
/>
5055
)}

0 commit comments

Comments
 (0)