added ImageMod component for image optimization

This commit is contained in:
somrat sorkar
2023-12-24 13:14:41 +06:00
parent 92ec961f80
commit 37d7a190d8
12 changed files with 127 additions and 27 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
---
import { plainify } from "@/lib/utils/textConverter";
import { Image } from "astro:assets";
import ImageMod from "./ImageMod.astro";
import Social from "./Social.astro";
const { data } = Astro.props;
@@ -12,7 +12,7 @@ const { title, image, social } = data.data;
>
{
image && (
<Image
<ImageMod
class="mx-auto mb-6 rounded"
src={image}
alt={title}