diff options
| author | Joe Carstairs <jcarstairs@scottlogic.com> | 2023-10-05 19:38:55 +0100 |
|---|---|---|
| committer | Joe Carstairs <jcarstairs@scottlogic.com> | 2023-10-05 19:40:19 +0100 |
| commit | 2f185ba211d3680be4481ce7f4d299d61601250d (patch) | |
| tree | fb9e748799c6f4f7de7b9ff4827115a324197efe /src/pages | |
| parent | ab5abcaac2d19c071bb073d57cd61fa57a627bb2 (diff) | |
Optimises images
Diffstat (limited to 'src/pages')
| -rw-r--r-- | src/pages/[locale]/furthsettins/index.astro | 6 | ||||
| -rw-r--r-- | src/pages/[locale]/index.astro | 8 |
2 files changed, 5 insertions, 9 deletions
diff --git a/src/pages/[locale]/furthsettins/index.astro b/src/pages/[locale]/furthsettins/index.astro index 97f530a..e1f4928 100644 --- a/src/pages/[locale]/furthsettins/index.astro +++ b/src/pages/[locale]/furthsettins/index.astro @@ -6,6 +6,8 @@ import tFurthsettins from '$i18n/translations/pages/furthsettins'; import tSite from '$i18n/translations/site'; import type Locale from '$types/Locale'; import relativePath from '$lib/relativePath'; +import lallansImg from '$images/furthsettins/lallans.jpg'; +import scotsounImg from '$images/furthsettins/scotsoun.jpg'; export async function getStaticPaths() { return localeStaticPaths; @@ -22,13 +24,13 @@ const t = translate(locale); <ul class="link-gallery link-gallery--furthsettins"> <li> <a href={relativePath(Astro.url.pathname, 'lallans')} class="link link-gallery__container"> - <img src="/images/furthsettins/lallans.jpg" /> + <img src={lallansImg.src} alt="" /> <p class="link-gallery__title">{t(tSite, { key: 'lallans' })}</p> </a> </li> <li> <a href={relativePath(Astro.url.pathname, 'scotsoun')} class="link link-gallery__container"> - <img src="/images/furthsettins/scotsoun.jpg" /> + <img src={scotsounImg.src} alt="" /> <p class="link-gallery__title">{t(tSite, { key: 'scotsoun' })}</p> </a> </li> diff --git a/src/pages/[locale]/index.astro b/src/pages/[locale]/index.astro index a230aee..653c637 100644 --- a/src/pages/[locale]/index.astro +++ b/src/pages/[locale]/index.astro @@ -50,13 +50,7 @@ const mostRecentNewsItem = await getMostRecentNewsItem(locale); { committee.map((member) => ( <li class="committee__member"> - {member.imgSrc && ( - <img - class="committee__member__img" - src={member.imgSrc} - alt={`A photo of ${member.name}`} - /> - )} + {member.img && <img class="committee__member__img" src={member.img.src} alt="" />} <div class="committee__member__text"> <h4> {member.name} |
