Wire homepage hero to featured thumbnail family; add featured-picture component

This commit is contained in:
2026-05-06 18:55:20 +02:00
parent 8fa3adf4df
commit 7a8bc8e22a
5 changed files with 271 additions and 142 deletions

View File

@@ -4,7 +4,15 @@
@push('head')
{{-- Preload hero image for faster LCP --}}
@if(!empty($props['hero']['thumb']) || !empty($props['hero']['thumb_lg']))
@if(!empty($props['hero']['featured_image']['preload_url']))
<link
rel="preload"
as="image"
href="{{ $props['hero']['featured_image']['preload_url'] }}"
@if(!empty($props['hero']['featured_image']['preload_srcset'])) imagesrcset="{{ $props['hero']['featured_image']['preload_srcset'] }}" imagesizes="{{ $props['hero']['featured_image']['preload_sizes'] ?? '100vw' }}" @endif
fetchpriority="high"
>
@elseif(!empty($props['hero']['thumb']) || !empty($props['hero']['thumb_lg']))
<link
rel="preload"
as="image"