Fix some Picture component typescript errors
This commit is contained in:
@ -23,11 +23,13 @@ const image = await findImage(post.image);
|
|||||||
src={image}
|
src={image}
|
||||||
class="md:object-cover w-full md:w-auto md:h-full rounded shadow-lg bg-gray-400 dark:bg-slate-700"
|
class="md:object-cover w-full md:w-auto md:h-full rounded shadow-lg bg-gray-400 dark:bg-slate-700"
|
||||||
widths={[400, 900]}
|
widths={[400, 900]}
|
||||||
width="400"
|
width={400}
|
||||||
height="224"
|
height={224}
|
||||||
sizes="(max-width: 900px) 400px, 900px"
|
sizes="(max-width: 900px) 400px, 900px"
|
||||||
alt={post.title}
|
alt={post.title}
|
||||||
aspectRatio="16:9"
|
aspectRatio="16:9"
|
||||||
|
loading="lazy"
|
||||||
|
decoding="async"
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -61,6 +61,9 @@ const { post, url } = Astro.props;
|
|||||||
aspectRatio={16 / 9}
|
aspectRatio={16 / 9}
|
||||||
width={900}
|
width={900}
|
||||||
height={506}
|
height={506}
|
||||||
|
loading="eager"
|
||||||
|
decoding="async"
|
||||||
|
background={undefined}
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<div class="max-w-3xl mx-auto px-4 sm:px-6">
|
<div class="max-w-3xl mx-auto px-4 sm:px-6">
|
||||||
|
Reference in New Issue
Block a user