summaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
authorJoe Carstairs <65492573+Sycamost@users.noreply.github.com>2023-10-13 20:07:29 +0100
committerJoe Carstairs <65492573+Sycamost@users.noreply.github.com>2023-10-13 20:08:23 +0100
commit6f61e056ae2c970ec17a2808e3372f121e948e8d (patch)
tree0a81793a5123134632a95fca694452075629e177 /src/components
parent300f8c673829f6af26f1b5e73e4e9d10e8dd6692 (diff)
Optimises Lallans images
Diffstat (limited to 'src/components')
-rw-r--r--src/components/LallansIssue.astro3
-rw-r--r--src/components/LallansIssuesGallery.astro5
2 files changed, 5 insertions, 3 deletions
diff --git a/src/components/LallansIssue.astro b/src/components/LallansIssue.astro
index 3b58124..c8bc6eb 100644
--- a/src/components/LallansIssue.astro
+++ b/src/components/LallansIssue.astro
@@ -4,6 +4,7 @@ import tSite from '$i18n/translations/site';
import { getLocaleFromPathOrThrow } from '$lib/getLocaleFromPath';
import relativePath from '$lib/relativePath';
import type LallansIssue from '$types/LallansIssue';
+import { Image } from 'astro:assets';
import LallansIssueContributions from './LallansIssueContributions.astro';
import LallansIssueContributors from './LallansIssueContributors.astro';
import PayPalButtons from './PayPalButtons.astro';
@@ -25,7 +26,7 @@ const t = translate(locale);
</header>
<div class="product__action-block">
- <img alt="" src={issue.img.src} />
+ <Image alt="" src={issue.img.width274} />
<PayPalButtons
successPageUrl={relativePath(Astro.url.pathname, `payment-success-confirmation`)}
productDescription={`Lallans ${issue.issueNumber} | ${issue.issueName}`}
diff --git a/src/components/LallansIssuesGallery.astro b/src/components/LallansIssuesGallery.astro
index 1d6a3e7..fd0ad0a 100644
--- a/src/components/LallansIssuesGallery.astro
+++ b/src/components/LallansIssuesGallery.astro
@@ -1,4 +1,5 @@
---
+import { Image } from 'astro:assets';
import { getAllLallansIssues } from '$data/lallans';
import { getLocaleFromPathOrThrow } from '$lib/getLocaleFromPath';
import type LallansIssue from '$types/LallansIssue';
@@ -13,13 +14,13 @@ function issueNumberDescending(issue1: LallansIssue, issue2: LallansIssue) {
<ul class="link-gallery">
{
- issues.map((issue) => (
+ issues.map(async (issue) => (
<li>
<a
class="link link-gallery__container"
href={`/${locale}/furthsettins/lallans/${issue.issueNumber}`}
>
- <img src={issue.img.src} alt="" />
+ <Image src={issue.img.width192} alt="" />
<p class="link-gallery__title">
Lallans {issue.issueNumber} | {issue.issueName}
</p>