fix: optimize hero image and migrate to next/image#346
fix: optimize hero image and migrate to next/image#346van456-dot wants to merge 2 commits intoAOSSIE-Org:mainfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughConverted native HTML Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment Tip CodeRabbit can approve the review once all CodeRabbit's comments are resolved.Enable the |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@app/components/Layout/NavBar/Navbar.css`:
- Around line 33-35: Remove the hardcoded CSS dimensions in Navbar.css (the
width: 13.48px and height: 24px rules) that conflict with the JSX Image props;
instead let the Image's width/height props control size and/or apply a matching
CSS class that does not override those props. Then update the Image in the
NavBar component (the Image element in app/components/Layout/NavBar/index.jsx)
so its width and height props match the intended display size (choose and set
either width={13} height={24} or width={40} height={40} consistently) and ensure
no other CSS selector in Navbar.css forces different dimensions.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 8a2bb7f6-2d57-4b4c-ba9b-1611f43c87f3
⛔ Files ignored due to path filters (1)
app/assets/resonate_app.pngis excluded by!**/*.png
📒 Files selected for processing (8)
app/assets/resonate_app.webpapp/components/About/About.jsxapp/components/DownloadApp/DownloadApp.jsxapp/components/Features/Features.jsxapp/components/Hero/Hero.jsxapp/components/Layout/NavBar/Navbar.cssapp/components/Layout/NavBar/index.jsxapp/components/TechStack/TechStack.jsx
Description
This PR improves image performance and loading behavior across the website by optimizing assets and using Next.js best practices.
Fixes #344
Changes made:
Converted large hero image (
resonate_app.png) to WebP format (~144KB)Migrated multiple components from
<img>tonext/image:Ensured compatibility with static export by retaining
images.unoptimized: trueinnext.config.jsMotivation & Context:
The project currently uses static export (
output: 'export'), which disables Next.js Image Optimization API.However, using
next/imagestill provides benefits like responsive loading and better layout handling.Additionally, existing PNG images were relatively large (>200KB) and already showed pixelation on zoom. Converting them to WebP reduces size significantly without noticeable quality loss in normal usage.
Type of change
How Has This Been Tested?
npm run devnext/imageScreenshots:
(Add before/after screenshots here if possible)
Checklist:
Maintainer Checklist
Summary by CodeRabbit
Refactor
Style