feat(image): enhance image handling with focal points and responsive support
Deploy / verify (push) Failing after 14s
Deploy / deploy (push) Has been skipped

- Added support for extracting focal points and alt text from CMS image fields.
- Introduced responsive image handling in TopBanner component, allowing for AVIF/WebP sources and LQIP placeholders.
- Updated image transformation functions to accommodate focal point parameters for better cropping.
- Refactored image URL resolution logic across various components and routes to utilize new image field structure.
This commit is contained in:
Peter Meier
2026-04-18 00:42:33 +02:00
parent 4d79bf08da
commit a139372ce2
12 changed files with 734 additions and 61 deletions
+16 -1
View File
@@ -20,7 +20,20 @@
seoDescription?: string;
socialImage?: string;
breadcrumbItems?: { href?: string; label: string }[];
topBanner?: { banner: unknown; resolvedImages: string[]; headline?: string; subheadline?: string } | null;
topBanner?: {
banner: unknown;
resolvedImages: string[];
headline?: string;
subheadline?: string;
responsive?: {
sources: { type: string; srcset: string }[];
fallback: string;
width: number;
height: number;
lqip?: string;
} | null;
focalCss?: string | null;
} | null;
});
const baseUrl = $derived(data.siteBaseUrl ?? '');
@@ -153,6 +166,8 @@
<TopBanner
banner={topBannerData.banner as import('$lib/cms').FullwidthBannerEntry | null}
resolvedImages={topBannerData.resolvedImages}
responsive={topBannerData.responsive ?? null}
focalCss={topBannerData.focalCss ?? null}
headline={topBannerData.headline}
subheadline={topBannerData.subheadline}
/>