From ed1d484ccb48cec887d9fa5bdef2f1d4fac305cd Mon Sep 17 00:00:00 2001 From: rzen Date: Mon, 4 May 2026 20:58:18 -0400 Subject: [PATCH] site: home + grid tiles use instead of raw MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Eliminates the byte-dedup hazard that just bit timelined and apex: every image consumer now goes through Astro's image pipeline, so duplicate bytes share their webp variants instead of one consumer's strategy silently winning and dropping the original asset. Side-benefit is significant: tiles and the home hero now ship responsive webp variants via srcset/sizes instead of the original PNG/JPG. The superkey hero alone drops from 192 KB to ~29 KB at the largest size. Video branches stay raw — astro:assets is image-only and videos don't have this bug. --- src/pages/grid.astro | 9 +++++---- src/pages/index.astro | 19 ++++++++++--------- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/src/pages/grid.astro b/src/pages/grid.astro index d8e90f0..5d0d396 100644 --- a/src/pages/grid.astro +++ b/src/pages/grid.astro @@ -1,5 +1,6 @@ --- import { getCollection } from 'astro:content'; +import { Image } from 'astro:assets'; import BaseLayout from '../layouts/BaseLayout.astro'; import Masonry from '../components/Masonry.astro'; import { heroes } from '../lib/hero'; @@ -30,11 +31,11 @@ const lastUpdated = reviews[0]?.data.date;
{tile.hero?.kind === 'image' && ( - {tile.name} {hero.hero?.kind === 'image' && ( - {hero.name} )} @@ -131,11 +132,11 @@ const itemList = buildItemList(