HeadlinesBriefing favicon HeadlinesBriefing.com

Fix Next.js alt text for better SEO

DEV Community •
×

Many developers use generic alt text in Next.js `<Image>` components, like `alt={product.name}` or `alt="product image"`. While technically valid, this wastes a key SEO opportunity. Google Images can drive 15-20% of organic traffic for e-commerce sites, but it relies on alt text to understand image content.

Effective alt text includes context beyond just a name. For products, combine the name, category, and rating. For blog posts, add the article type. This gives Google searchable terms, topical relevance, and content type. The fix is simple: update your `ProductCard` and `BlogCard` components with descriptive, natural language strings.

Avoid keyword stuffing, as Google penalizes it. After implementing this pattern on a small product site, Google Search Console showed increased image impressions within a week. The effort-to-impact ratio is high—five minutes of work for a permanent SEO improvement.