⚡ Bolt: Optimize image loading on projects view using build-time generation - #181
⚡ Bolt: Optimize image loading on projects view using build-time generation#181fysp11 wants to merge 1 commit into
Conversation
…ration - Replaced incompatible Astro `<Image />` component with standard `<img>` tags in React. - Used `import.meta.glob` and Astro's `getImage()` at the server level (`index.astro`) to pre-optimize dynamic images into WebP strings at build-time. - Conditionally applied `fetchPriority="high"` and `loading="eager"` only to above-the-fold images to optimize LCP. 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: Implemented build-time WebP optimization for dynamic images in the React components, replacing the invalid usage of the Astro
<Image />component with standard<img>tags that use pre-computed optimized strings. Applied targetedfetchPriorityandloadingattributes.🎯 Why: The Astro
<Image />component cannot be used natively inside.tsxfiles, leading to unoptimized image loading. Furthermore, assigning eager loading to all mapped images was a performance anti-pattern.📊 Impact:
🔬 Measurement:
pnpm run buildand inspect the generated HTML in/distto confirm standard<img>tags possess/dist/_astro/*.webpsources and correct loading/priority rules for initial index values.PR created automatically by Jules for task 198499415907811784 started by @fysp11