mirror of
https://github.com/block/buzz.git
synced 2026-11-05 00:41:28 +00:00
perf: lazy-load avatars and message images (#1517)
Signed-off-by: npub12gtutshhh76rx0jx697f32f9tffd4hhp3hx58fp4x6u4uemkm7sqf8f757 <5217c5c2f7bfb4333e46d17c98a9255a52dadee18dcd43a43536b95e6776dfa0@sprout-oss.stage.blox.sqprod.co> Co-authored-by: npub12gtutshhh76rx0jx697f32f9tffd4hhp3hx58fp4x6u4uemkm7sqf8f757 <5217c5c2f7bfb4333e46d17c98a9255a52dadee18dcd43a43536b95e6776dfa0@sprout-oss.stage.blox.sqprod.co>
This commit is contained in:
@@ -25,6 +25,8 @@ const AvatarImage = React.forwardRef<
|
||||
<AvatarPrimitive.Image
|
||||
ref={ref}
|
||||
className={cn("aspect-square h-full w-full", className)}
|
||||
decoding="async"
|
||||
loading="lazy"
|
||||
{...props}
|
||||
/>
|
||||
));
|
||||
|
||||
@@ -1494,7 +1494,9 @@ function ImageBlock({ alt, dim, resolvedSrc, src }: ImageBlockProps) {
|
||||
alt={alt}
|
||||
className="block h-auto max-h-64 max-w-[min(24rem,100%)] rounded-2xl object-contain"
|
||||
data-spoiler-media-size={hiddenSpoilerMediaSize ? "" : undefined}
|
||||
decoding="async"
|
||||
height={intrinsicDimensions.height}
|
||||
loading="lazy"
|
||||
ref={imageRef}
|
||||
src={resolvedSrc}
|
||||
style={spoilerMediaStyle}
|
||||
|
||||
Reference in New Issue
Block a user