summaryrefslogtreecommitdiff
path: root/src/components/CommitteeList
diff options
context:
space:
mode:
authorJoe Carstairs <65492573+Sycamost@users.noreply.github.com>2023-10-13 21:37:39 +0100
committerJoe Carstairs <65492573+Sycamost@users.noreply.github.com>2023-10-13 21:37:39 +0100
commit76b737c5978732363317e029aeec6d3ce9c8234d (patch)
treec4dd78aeb7b08d387efc85b13fa2f7d88f021b56 /src/components/CommitteeList
parent796fdeed465f8a4f9d4aaaaf9ddf448f91e901e6 (diff)
Optimises Committee images
Diffstat (limited to 'src/components/CommitteeList')
-rw-r--r--src/components/CommitteeList/CommitteeListItem.astro18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/components/CommitteeList/CommitteeListItem.astro b/src/components/CommitteeList/CommitteeListItem.astro
index d026047..9a5a55b 100644
--- a/src/components/CommitteeList/CommitteeListItem.astro
+++ b/src/components/CommitteeList/CommitteeListItem.astro
@@ -19,7 +19,23 @@ const t = translate(locale);
<li class="committee__member">
{
committeeMember.img && (
- <img class="committee__member__img" src={committeeMember.img.src} alt="" />
+ <img
+ class="committee__member__img"
+ srcset={`
+ ${committeeMember.img.width106.src} 106w,
+ ${committeeMember.img.width146.src} 146w,
+ ${committeeMember.img.width192.src} 192w,
+ ${committeeMember.img.width222.src} 222w
+ `}
+ sizes="
+ (min-width: 120rem) 222px,
+ (min-width: 96rem) 146px,
+ (min-width: 64rem) 192px,
+ (min-width: 48rem) 222px,
+ 106px
+ "
+ alt=""
+ />
)
}
<div class="committee__member__text">