⚡ Bolt: Optimize image loading in ProjectsView - #180
Conversation
- Replaced invalid Astro `Image` component with standard HTML `<img>` in React component list view - Fixed invalid `class` prop to `className` in list view React component - Added native LCP optimizations (`fetchPriority="high"`, `loading="eager"`) for above-the-fold images based on array index thresholds - Added native lazy loading (`loading="lazy"`) for below-the-fold images - Added `decoding="async"` to prevent blocking the main thread during image decoding Co-authored-by: fysp11 <13081700+fysp11@users.noreply.github.com>
|
👋 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. |
Preview deployments for fysp11.github.io ⚡️
Commit: Deployment ID: Static site name: |
💡 What: Optimized the image loading pipeline in the
ProjectsView.tsxcomponent by correcting invalid component usage and adding native performance attributes.🎯 Why: The component previously used an Astro
<Image />component inside a React component (which is unsupported and leads to issues like theclassprop error). Furthermore, images were missing critical performance attributes likeloading="lazy"for offscreen elements andfetchPriority="high"for LCP candidates, hurting both initial load speed and resource bandwidth.📊 Impact: Expected to improve Largest Contentful Paint (LCP) by prioritizing the first few viewable images and save bandwidth / prevent Main Thread blocking by lazily loading and asynchronously decoding remaining images.
🔬 Measurement: Verify via Network tab that first 2-4 (depending on view) images load immediately with high priority, while subsequent images load only when scrolled into view.
PR created automatically by Jules for task 1958368383725252032 started by @fysp11