From 9a92b1939c958fc4d3f313860fc39fd3c882a64d Mon Sep 17 00:00:00 2001
From: itsfinniii <102350242+itsfinniii@users.noreply.github.com>
Date: Mon, 27 Apr 2026 20:59:43 +0200
Subject: [PATCH] Fix the Photo Layout thumbnail
---
astro/src/layouts/PhotoLayout.astro | 21 +++++++++++++++++++--
1 file changed, 19 insertions(+), 2 deletions(-)
diff --git a/astro/src/layouts/PhotoLayout.astro b/astro/src/layouts/PhotoLayout.astro
index fdff439..1d6c60d 100644
--- a/astro/src/layouts/PhotoLayout.astro
+++ b/astro/src/layouts/PhotoLayout.astro
@@ -3,6 +3,8 @@ import '@/styles/global.css';
import { getSettings } from "@/content/settings/settings";
import { getTextColor } from '@/lib/colors';
import Footer from '@/components/footer/Footer.astro';
+import { getImageSize } from '@/lib/images';
+import { getImage } from 'astro:assets';
interface Props {
settings: WebpageLayoutProps;
@@ -19,6 +21,21 @@ const css = {
? getTextColor(settings.website.colors.secondary)
: getTextColor(settings.website.colors.primary)
};
+
+const searchengine = Astro.props.settings.searchEngine;
+
+// Changing the thumbnail here is okay, as we now have two images: a new thumbnail, and the original image.
+// Might have to make it prettier down the line?
+// TODO: See comment above.
+const resizedThumbnail = getImageSize(searchengine.thumbnail.width,
+ searchengine.thumbnail.height, 0.756);
+
+const thumbnail = await getImage({
+ src: searchengine.thumbnail.url,
+ width: resizedThumbnail.width,
+ height: resizedThumbnail.height,
+ format: "jpeg"
+});
---
@@ -50,14 +67,14 @@ const css = {
-
+
-
+