summaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
authorJoe Carstairs <65492573+Sycamost@users.noreply.github.com>2023-10-13 20:47:26 +0100
committerJoe Carstairs <65492573+Sycamost@users.noreply.github.com>2023-10-13 20:47:26 +0100
commit8b2d91cb1cdff722bb4913c8f023c6cd16801e5c (patch)
treedaa01363380ac93258bc827fbef55ac03adba9f8 /src/components
parentec59b216df4aefada7502872dad9fbd8efe165e5 (diff)
Optimises Scotsoun images
Diffstat (limited to 'src/components')
-rw-r--r--src/components/Scotsoun.astro3
-rw-r--r--src/components/ScotsounCdGallery.astro3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/components/Scotsoun.astro b/src/components/Scotsoun.astro
index 594b8c9..bbf9730 100644
--- a/src/components/Scotsoun.astro
+++ b/src/components/Scotsoun.astro
@@ -1,4 +1,5 @@
---
+import { Image } from 'astro:assets';
import translate from '$i18n/translate';
import tSite from '$i18n/translations/site';
import tComponent from '$i18n/translations/components/scotsoun';
@@ -25,7 +26,7 @@ const t = translate(locale);
{scotsoun?.author && <p>{t(tSite, { key: 'by' }) + ' ' + scotsoun.author}</p>}
</header>
<div class="product__action-block">
- <img src={scotsoun.img.src} alt="" />
+ <Image src={scotsoun.img.width192} alt="" />
<PayPalButtons
successPageUrl={relativePath(Astro.url.pathname, `payment-success-confirmation`)}
productDescription={`SSCD${scotsoun.scotsounId} | ${scotsoun.longName}`}
diff --git a/src/components/ScotsounCdGallery.astro b/src/components/ScotsounCdGallery.astro
index 1c810a0..d2c7e0b 100644
--- a/src/components/ScotsounCdGallery.astro
+++ b/src/components/ScotsounCdGallery.astro
@@ -1,4 +1,5 @@
---
+import { Image } from 'astro:assets';
import { getAllScotsoun } from '$data/scotsoun';
import { getLocaleFromPathOrThrow } from '$lib/getLocaleFromPath';
import type Scotsoun from '$types/Scotsoun';
@@ -19,7 +20,7 @@ function scotsounIdDescending(scotsoun1: Scotsoun, scotsoun2: Scotsoun) {
class="link link-gallery__container"
href={`/${locale}/furthsettins/scotsoun/${scotsounItem.scotsounId}`}
>
- <img src={scotsounItem.img.src} alt="" />
+ <Image src={scotsounItem.img.width192} alt="" />
<p class="link-gallery__title">{scotsounItem.title}</p>
</a>
</li>