added image size

This commit is contained in:
2026-05-14 18:07:08 +02:00
parent ceb3750add
commit 2ace527c9f
4 changed files with 27 additions and 4 deletions
@@ -6,6 +6,8 @@ const PAGE_SIZE = 9;
interface CoverImage {
url: string;
alt: string;
w?: number;
h?: number;
}
interface Post {
@@ -135,7 +137,11 @@ export default function PostList({ posts: initialPosts, isAdmin = false }: Props
<img
src={post.cover_image!.url}
alt={post.cover_image!.alt || displayTitle}
width={post.cover_image!.w}
height={post.cover_image!.h}
loading={idx < 3 ? 'eager' : 'lazy'}
decoding={idx === 0 ? 'sync' : 'async'}
fetchPriority={idx === 0 ? 'high' : undefined}
/>
) : (
<div