From 3d19b8c0ac7908379ff80751ed9cdf839de50c9f Mon Sep 17 00:00:00 2001 From: somrat sorkar Date: Mon, 24 Jul 2023 10:53:54 +0600 Subject: [PATCH] update images --- src/layouts/PostSingle.astro | 1 + src/layouts/components/AuthorCard.astro | 1 + src/layouts/components/BlogCard.astro | 3 ++- src/layouts/components/Logo.astro | 4 +++- src/layouts/partials/CallToAction.astro | 3 ++- src/layouts/partials/Testimonial.astro | 11 ++++++----- src/pages/about.astro | 3 ++- src/pages/authors/[single].astro | 3 ++- src/pages/index.astro | 2 ++ 9 files changed, 21 insertions(+), 10 deletions(-) diff --git a/src/layouts/PostSingle.astro b/src/layouts/PostSingle.astro index 8a9c12f..5df4ccf 100755 --- a/src/layouts/PostSingle.astro +++ b/src/layouts/PostSingle.astro @@ -35,6 +35,7 @@ const { title, description, author, categories, image, date, tags } = post.data; width={1200} alt={title} class="w-full rounded" + format="webp" /> ) diff --git a/src/layouts/components/AuthorCard.astro b/src/layouts/components/AuthorCard.astro index 7d16889..0a7ca21 100644 --- a/src/layouts/components/AuthorCard.astro +++ b/src/layouts/components/AuthorCard.astro @@ -18,6 +18,7 @@ const { title, image, social } = data.data; alt={title} width={120} height={120} + format="webp" /> ) } diff --git a/src/layouts/components/BlogCard.astro b/src/layouts/components/BlogCard.astro index 979b309..5067ce2 100644 --- a/src/layouts/components/BlogCard.astro +++ b/src/layouts/components/BlogCard.astro @@ -1,7 +1,7 @@ --- -import { Image } from "@astrojs/image/components"; import config from "@/config/config.json"; import { humanize, plainify, slugify } from "@/lib/utils/textConverter"; +import { Image } from "@astrojs/image/components"; import { FaRegFolder, FaRegUserCircle } from "react-icons/fa/index.js"; const { @@ -21,6 +21,7 @@ const { title, image, date, author, categories } = data.data; alt={title} width={445} height={230} + format="webp" /> ) } diff --git a/src/layouts/components/Logo.astro b/src/layouts/components/Logo.astro index 1f47c6b..ab23f50 100644 --- a/src/layouts/components/Logo.astro +++ b/src/layouts/components/Logo.astro @@ -1,6 +1,6 @@ --- -import { Image } from "@astrojs/image/components"; import config from "@/config/config.json"; +import { Image } from "@astrojs/image/components"; const { src, srcDarkmode }: { src?: string; srcDarkmode?: string } = Astro.props; @@ -39,6 +39,7 @@ const { theme_switcher }: { theme_switcher: boolean } = config.settings; height: logo_height.replace("px", "") + "px", width: logo_width.replace("px", "") + "px", }} + format="webp" /> {theme_switcher && ( )} diff --git a/src/layouts/partials/CallToAction.astro b/src/layouts/partials/CallToAction.astro index cd4422e..386c2fd 100644 --- a/src/layouts/partials/CallToAction.astro +++ b/src/layouts/partials/CallToAction.astro @@ -1,6 +1,6 @@ --- -import { Image } from "@astrojs/image/components"; import { markdownify } from "@/lib/utils/textConverter"; +import { Image } from "@astrojs/image/components"; const { call_to_action } = Astro.props; --- @@ -17,6 +17,7 @@ const { call_to_action } = Astro.props; width={392} height={390} alt="cta-image" + format="webp" />
diff --git a/src/layouts/partials/Testimonial.astro b/src/layouts/partials/Testimonial.astro index e2b79b2..85c6b96 100644 --- a/src/layouts/partials/Testimonial.astro +++ b/src/layouts/partials/Testimonial.astro @@ -51,6 +51,7 @@ const { testimonial } = Astro.props; class="rounded-full" src={item.avatar} alt={item.name} + format="webp" />
@@ -66,7 +67,7 @@ const { testimonial } = Astro.props;
- ) + ), )}
@@ -79,10 +80,10 @@ const { testimonial } = Astro.props; }