From c662d4719b23b63f4691fac3aaaf8c6270939998 Mon Sep 17 00:00:00 2001 From: ebby Date: Tue, 28 Jul 2026 11:24:32 +0200 Subject: [PATCH] better image generation --- blog/src/components/PostPreviewLarge.astro | 7 ++++++- blog/src/layouts/BlogPostLayout.astro | 5 +++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/blog/src/components/PostPreviewLarge.astro b/blog/src/components/PostPreviewLarge.astro index eb5033b..430fc8c 100644 --- a/blog/src/components/PostPreviewLarge.astro +++ b/blog/src/components/PostPreviewLarge.astro @@ -1,6 +1,7 @@ --- import type { Post } from "../types/global"; import { findImageByPath } from "../lib/findImage"; +import { Image } from "astro:assets"; interface Props { post: Post; @@ -15,7 +16,11 @@ const img = findImageByPath(post.image.path);
- {post.image.alt} + {post.image.alt}
diff --git a/blog/src/layouts/BlogPostLayout.astro b/blog/src/layouts/BlogPostLayout.astro index ab7f708..2e475c7 100644 --- a/blog/src/layouts/BlogPostLayout.astro +++ b/blog/src/layouts/BlogPostLayout.astro @@ -1,4 +1,5 @@ --- +import { Image } from "astro:assets"; import BackNav from "../components/BackNav.astro"; import { findImageByPath } from "../lib/findImage"; import type { Post } from "../types/global"; @@ -15,9 +16,9 @@ const titleImg = findImageByPath(frontmatter.image.path);
- {frontmatter.image.alt}