From 57c9cea28c2dc8913a88a5075b1e9f3bff37386e Mon Sep 17 00:00:00 2001 From: Ryan Lalchand <70449616+ryanlalchand@users.noreply.github.com> Date: Thu, 11 Jul 2024 14:30:13 -0400 Subject: [PATCH] fix article image logic --- src/pages/reporting.astro | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pages/reporting.astro b/src/pages/reporting.astro index db88b17..6138429 100644 --- a/src/pages/reporting.astro +++ b/src/pages/reporting.astro @@ -7,7 +7,9 @@ import { fetchImage } from "../utils/fetchImage"; // Fetch images for articles during build const articlesWithImages = await Promise.all( articles.map(async (article) => { - const imageUrl = article.image || (await fetchImage(article.link)); + const imageUrl = + (await fetchImage(article.link)) || + "/photography-compressed/" + article.image; return { ...article, image: imageUrl,