From d4560c1226f86d141a04400ddfbeef094ea2909e Mon Sep 17 00:00:00 2001 From: prototypa Date: Tue, 31 Jan 2023 14:50:23 -0500 Subject: [PATCH] Fix some Picture component typescript errors --- src/components/blog/GridItem.astro | 6 ++++-- src/components/blog/SinglePost.astro | 3 +++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/components/blog/GridItem.astro b/src/components/blog/GridItem.astro index a8cd924..13339ad 100644 --- a/src/components/blog/GridItem.astro +++ b/src/components/blog/GridItem.astro @@ -23,11 +23,13 @@ const image = await findImage(post.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" widths={[400, 900]} - width="400" - height="224" + width={400} + height={224} sizes="(max-width: 900px) 400px, 900px" alt={post.title} aspectRatio="16:9" + loading="lazy" + decoding="async" /> ) } diff --git a/src/components/blog/SinglePost.astro b/src/components/blog/SinglePost.astro index 75c1cd1..2b0dd35 100644 --- a/src/components/blog/SinglePost.astro +++ b/src/components/blog/SinglePost.astro @@ -61,6 +61,9 @@ const { post, url } = Astro.props; aspectRatio={16 / 9} width={900} height={506} + loading="eager" + decoding="async" + background={undefined} /> ) : (