Skip to content

Commit 880e1dc

Browse files
committed
fix: add height and sizes attributes to image components for better responsiveness
1 parent 29bffa0 commit 880e1dc

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/utils/partners.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,17 @@ export function PartnerImage({
6767
loading="lazy"
6868
className="w-full dark:hidden"
6969
width={200}
70+
height={100}
71+
sizes="(max-width: 640px) 80px, (max-width: 1024px) 150px, 200px"
7072
/>
7173
<img
7274
src={config.dark}
7375
alt={alt}
7476
loading="lazy"
7577
className="w-full hidden dark:block"
7678
width={200}
79+
height={100}
80+
sizes="(max-width: 640px) 80px, (max-width: 1024px) 150px, 200px"
7781
/>
7882
</div>
7983
)
@@ -86,7 +90,9 @@ export function PartnerImage({
8690
alt={alt}
8791
className="w-full"
8892
width={200}
93+
height={100}
8994
loading="lazy"
95+
sizes="(max-width: 640px) 80px, (max-width: 1024px) 150px, 200px"
9096
/>
9197
</div>
9298
)

0 commit comments

Comments
 (0)