From 4cc00d26b40ae4f7028da480b87fc9a08691b684 Mon Sep 17 00:00:00 2001 From: kritzl Date: Tue, 6 Oct 2026 20:03:36 +0200 Subject: [PATCH] fix image file read with staging base path --- src/pages/hamburg/2026/index.astro | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pages/hamburg/2026/index.astro b/src/pages/hamburg/2026/index.astro index 517bbfb..53c254f 100644 --- a/src/pages/hamburg/2026/index.astro +++ b/src/pages/hamburg/2026/index.astro @@ -55,7 +55,8 @@ for (const image_name in images_raw) { const imageResponse = await fetch(imagePath) buffer = Buffer.from(await imageResponse.arrayBuffer()) } else { - const imagePath = "./dist" + image.image.src + const path = image.image.src.substring((import.meta.env.BASE_URL).length).replace(/(^[\/]*|[\/]*$)/g, '') + const imagePath = "./dist/" + path buffer = await readFile(imagePath) }