feat: lazy on home image

This commit is contained in:
Julien Froidefond
2025-02-16 21:42:09 +01:00
parent 28ac45993d
commit 068c623e37
2 changed files with 4 additions and 4 deletions

View File

@@ -64,8 +64,8 @@ function CoverImage({ series }: CoverImageProps) {
imageLoading ? "opacity-0" : "opacity-100"
)}
sizes="(max-width: 640px) 50vw, (max-width: 1024px) 33vw, 16.666vw"
priority={true}
loading="eager"
loading="lazy"
quality={25}
onError={() => setImageError(true)}
onLoad={() => setImageLoading(false)}
/>

View File

@@ -119,8 +119,8 @@ function MediaCard({ item, onClick }: MediaCardProps) {
imageLoading ? "opacity-0" : "opacity-100"
)}
sizes="200px"
priority={true}
loading="eager"
loading="lazy"
quality={50}
onError={() => setImageError(true)}
onLoad={() => setImageLoading(false)}
/>