-
-
Notifications
You must be signed in to change notification settings - Fork 276
Open
Labels
Tech: JavaScriptThis item requires knowledge of JavaScriptThis item requires knowledge of JavaScriptType: EnhancementNew feature or requestNew feature or request
Description
Description
Convert regular <img> tags to Next.js <Image> components throughout the codebase for better performance, automatic optimization, and improved SEO. Next.js Image provides built-in lazy loading, responsive images, and automatic format optimization.
Acceptance Criteria
- Replace
<img>tags insrc/app/podcast/page.tsx - Replace
<img>tags insrc/app/podcast/[slug]/page.tsx - Replace
<img>tags insrc/app/events/page.tsx - Replace
<img>tags insrc/app/page.tsx(sponsors section) - Replace
<img>tags insrc/components/MemberCards.tsx - Replace
<img>tags insrc/components/UndrawIllustration.tsx - Ensure all images have proper alt text
- Test that images load correctly and maintain aspect ratios
- Verify responsive behavior across different screen sizes
Technical Requirements
- Import Next.js Image component:
import Image from 'next/image' - Convert width/height attributes to proper Next.js Image props
- Handle
loading="lazy"attribute (Next.js handles this automatically) - Convert
srcSetto Next.jssizesprop where applicable - Ensure
altattributes are preserved - Handle any custom styling that may conflict with Next.js Image
Files to Update
src/app/podcast/page.tsx- Podcast episode thumbnailssrc/app/podcast/[slug]/page.tsx- Guest headshots and sponsor imagessrc/app/events/page.tsx- Sponsor imagessrc/app/page.tsx- Sponsor avatars and supporter imagessrc/components/MemberCards.tsx- Member avatar imagessrc/components/UndrawIllustration.tsx- Illustration images
Benefits
- β¨ Automatic image optimization and format conversion
- β‘ Built-in lazy loading for better performance
- π± Responsive images with automatic srcSet generation
- π― Better Core Web Vitals scores
- π Improved SEO through optimized images
Testing Checklist
- Images display correctly on desktop and mobile
- No layout shift when images load
- Alt text is preserved and accessible
- Loading performance is improved (check Network tab)
- No console errors related to images
Resources
Difficulty: Beginner-Intermediate
Good for contributors familiar with React who want to learn Next.js optimization patterns.
Metadata
Metadata
Assignees
Labels
Tech: JavaScriptThis item requires knowledge of JavaScriptThis item requires knowledge of JavaScriptType: EnhancementNew feature or requestNew feature or request