Skip to content

⚡ Bolt: Optimize image rendering in ProjectsView - #159

Open
fysp11 wants to merge 1 commit into
mainfrom
bolt-perf-image-optimization-16698535432108647905
Open

⚡ Bolt: Optimize image rendering in ProjectsView#159
fysp11 wants to merge 1 commit into
mainfrom
bolt-perf-image-optimization-16698535432108647905

Conversation

@fysp11

@fysp11 fysp11 commented Jul 31, 2026

Copy link
Copy Markdown
Owner

⚡ Bolt: Optimize image rendering in ProjectsView

💡 What:

  • Pre-compute Astro optimized images (grid & list variants) using getImage() in src/pages/projects/index.astro.
  • Replaced the Astro <Image /> component with standard <img> tags in src/components/ProjectsView.tsx.
  • Implemented loading="eager" and fetchPriority="high" attributes for above-the-fold images and loading="lazy" for others.
  • Documented findings in .jules/bolt.md.

🎯 Why:
Astro's built-in <Image /> component does not work correctly for React UI components. Doing this manually with <img> drops build-time webp conversion and scaling. This allows us to have both the interactive React UI and the build-time optimizations. Applying optimal attributes further speeds up initial viewport loads.

📊 Impact:

  • Regains build-time webp conversions, reducing bandwidth usage.
  • Improves LCP (Largest Contentful Paint) for above-the-fold images via eager loading and high fetch priority.
  • Offloads below-the-fold image loads via lazy loading.

🔬 Measurement:
Run pnpm run build and inspect the dist folder network requests to ensure webp assets are correctly requested by the browser, and loading attributes are properly set in the DOM.


PR created automatically by Jules for task 16698535432108647905 started by @fysp11

💡 What:
- Pre-compute Astro optimized images (grid & list variants) using `getImage()` in `src/pages/projects/index.astro`.
- Replaced the Astro `<Image />` component with standard `<img>` tags in `src/components/ProjectsView.tsx`.
- Implemented `loading="eager"` and `fetchPriority="high"` attributes for above-the-fold images and `loading="lazy"` for others.
- Documented findings in `.jules/bolt.md`.

🎯 Why:
Astro's built-in `<Image />` component does not work correctly for React UI components. Doing this manually with `<img>` drops build-time webp conversion and scaling. This allows us to have both the interactive React UI and the build-time optimizations. Applying optimal attributes further speeds up initial viewport loads.

📊 Impact:
- Regains build-time webp conversions, reducing bandwidth usage.
- Improves LCP (Largest Contentful Paint) for above-the-fold images via eager loading and high fetch priority.
- Offloads below-the-fold image loads via lazy loading.

🔬 Measurement:
Run `pnpm run build` and inspect the `dist` folder network requests to ensure webp assets are correctly requested by the browser, and loading attributes are properly set in the DOM.

Co-authored-by: fysp11 <13081700+fysp11@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@kinsta

kinsta Bot commented Jul 31, 2026

Copy link
Copy Markdown

Preview deployments for fysp11.github.io ⚡️

Status Branch preview Commit preview
✅ Ready Visit preview Visit preview

Commit: 07d086a613bf6bd219e1e462e09e4c65ef7aad53

Deployment ID: e65405dc-8e91-4156-ac3d-7c60c92c06be

Static site name: fysp11githubio-cleb3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant