# 🚫 Avoid Passing Empty String to `src` Prop in Next.js `<Image />` Component
- Dominant language
- Python
- Stars
- 451
- Forks
- 707
- Avg merge
- 22h 59m
- Merged PRs (30d)
- 91
Description
## Description
While reviewing the code in `RecentReleases.tsx`, I noticed the following pattern:
```tsx
src={item?.author?.avatarUrl || ''}
```
Passing an empty string (`''`) to the `src` prop of the Next.js `` component is not recommended. According to the [Next.js documentation](https://nextjs.org/docs/pages/api-reference/components/image#src), the `src` must be a valid, non-empty string. Using an empty string can lead to:
- Console warnings
- Failed network requests
- Broken image icons in the UI
---
## ✅ Recommended Fix
Instead of defaulting to an empty string, consider either:
**1. Passing `undefined`:**
```tsx
src={item?.author?.avatarUrl || undefined}
```
**2. Conditionally rendering the `` component:**
```tsx
{item?.author?.avatarUrl && (
)}
```
---
## 📄 Reference
- [Next.js Image Component Documentation](https://nextjs.org/docs/pages/api-reference/components/image#src)

Contributor guide
Research direction
Open RecentReleases.tsx and inspect the Image component's avatarUrl handling. Compare the available fallback approaches with the Next.js Image documentation, then verify that missing avatar URLs no longer produce an empty src and that the release list still renders correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- next.js, react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 75/100