added image size
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user