Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions apps/web/src/components/dashboard/ProjectsContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ export default function ProjectsContainer({
<Image
src={p.avatarUrl}
className="w-full h-full object-cover"
unoptimized
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash

# Get full ProjectsContainer.tsx to understand the Image component usage
echo "=== Full ProjectsContainer.tsx file ==="
fd 'ProjectsContainer.tsx' --exec cat {} \;

Repository: apsinghdev/opensox

Length of output: 7075


🏁 Script executed:

#!/bin/bash

# Find and read next.config file
echo "=== Looking for next.config files in apps/web ==="
find apps/web -maxdepth 2 -name "next.config.*" -type f -exec cat {} \;

echo -e "\n=== Checking root level next.config ==="
find . -maxdepth 1 -name "next.config.*" -type f -exec cat {} \;

echo -e "\n=== Checking if github domains are in any config ==="
rg "github|remotePatterns" --type ts --type js --max-count 20

Repository: apsinghdev/opensox

Length of output: 5815


Remove the unoptimized prop—GitHub avatars domain is already configured in remotePatterns.

The avatars.githubusercontent.com domain is already whitelisted in apps/web/next.config.js, so Next.js image optimization will work without disabling it. The unoptimized prop conflicts with the coding guideline to "optimize images using next/image" and unnecessarily removes optimization benefits like automatic format conversion and responsive sizing.

Remove the unoptimized prop from line 124:

                        <Image
                          src={p.avatarUrl}
                          className="w-full h-full object-cover"
-                         unoptimized
                          alt={p.name}
                          width={24}
                          height={24}
                        />
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
unoptimized
<Image
src={p.avatarUrl}
className="w-full h-full object-cover"
alt={p.name}
width={24}
height={24}
/>
🤖 Prompt for AI Agents
In apps/web/src/components/dashboard/ProjectsContainer.tsx around line 124,
remove the unoptimized prop from the Next.js Image component — the
avatars.githubusercontent.com domain is already allowed in
apps/web/next.config.js remotePatterns so image optimization should remain
enabled; simply delete the unoptimized attribute from the JSX element so Next.js
can apply automatic optimization features (responsive sizes, modern formats,
caching) while keeping the rest of the Image props intact.

alt={p.name}
width={24}
height={24}
Expand Down