⚡ Bolt: Optimize ProjectsView Images and Fix Astro Integration - #161
⚡ Bolt: Optimize ProjectsView Images and Fix Astro Integration#161fysp11 wants to merge 1 commit into
Conversation
…act component - Replaced invalid Astro `<Image />` import inside React with standard `<img>` tags. - Hooked into `import.meta.glob` and `getImage` server-side to restore build-time WebP conversions and precise dimensions. - Corrected React hydration warnings (`class` to `className` and `fetchpriority` to `fetchPriority`). - Configured LCP image optimization using index-based `loading="eager"` (for first 2/4 items) and `lazy` for below-the-fold content. Co-authored-by: fysp11 <13081700+fysp11@users.noreply.github.com>
Preview deployments for fysp11.github.io ⚡️
Commit: Deployment ID: Static site name: |
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
💡 What:
<Image />component fromProjectsView.tsxwhich was silently failing or rendering unoptimized.import.meta.globand Astro'sgetImagefunction withinprojects/index.astro.fetchPriority="high"andloading="eager"only to the first few images (above the fold), defaulting tolazyfor the rest.🎯 Why:
astro:assetsinside React).<img>tags with optimal dimensions generated viagetImage()restores the build-time optimizations safely while ensuring LCP isn't blocked by fetching a dozen eager images.📊 Impact:
decoding="async"combined with conditional lazy loading for below-the-fold images.🔬 Measurement:
pnpm run buildand observe in the.distfolder that optimized 80x80 and 800x600 WebP versions of the project images are correctly generated and referenced by the frontend payload.PR created automatically by Jules for task 14895692531077196425 started by @fysp11