Skip to content

⚡ Bolt: Replace Astro <Image> in React with pre-optimized <img> tags - #182

Open
fysp11 wants to merge 1 commit into
mainfrom
bolt-optimize-astro-image-react-2328763758083184544
Open

⚡ Bolt: Replace Astro <Image> in React with pre-optimized <img> tags#182
fysp11 wants to merge 1 commit into
mainfrom
bolt-optimize-astro-image-react-2328763758083184544

Conversation

@fysp11

@fysp11 fysp11 commented Aug 8, 2026

Copy link
Copy Markdown
Owner
  • 💡 What: Replaced the astro:assets <Image /> tag inside the React ProjectsView.tsx component with a standard HTML <img> tag, and shifted the image optimization logic to the server side (index.astro).
  • 🎯 Why: Astro's built-in <Image /> component is an Astro component and cannot be safely rendered inside React .tsx files dynamically on the client, which can cause hydration issues or build errors.
  • 📊 Impact: This resolves the potential component incompatibility issue and ensures images are still optimized via build-time getImage() resolving to small WebP formats.
  • 🔬 Measurement: Verify by navigating to /projects and changing to "list" view to ensure images load correctly and pnpm run check passes.

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

Replaced the incompatible Astro <Image /> component inside ProjectsView.tsx with a standard HTML <img> tag. To retain build-time image optimization, getImage() was used on the server in index.astro to pre-compute optimized WebP images, and pass those string URLs down. This prevents build/render errors while preserving performance.

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

kinsta Bot commented Aug 8, 2026

Copy link
Copy Markdown

Preview deployments for fysp11.github.io ⚡️

Status Branch preview Commit preview
✅ Ready Visit preview Visit preview

Commit: ca3eebbd8f0491e73284780df1143068ae156223

Deployment ID: 4372f01b-1bc7-4ca2-93d4-74cb58723b07

Static site name: fysp11githubio-cleb3

@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.

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