[Bug]: Replace <img> tags with next/image to satisfy Next.js lint warnings
还没有人认领这个 Issue。
- 主要语言
- JavaScript
- 星标
- 11.8k
- 派生
- 7.9k
- 平均合并
- 1 天 11 小时
- 30 天内合并 PR
- 11
描述
Summary
The project currently triggers @next/next/no-img-element lint warnings because raw <img> tags are used in a few components. These should be reviewed and replaced with Image from next/image where appropriate.
Page
N/A
Details
Running the lint command reports @next/next/no-img-element warnings in the following files:
src/components/Layout/HomeContent.jssrc/components/MDX/MDXComponents.tsx
Warning count:
HomeContent.js: 4 occurrencesMDXComponents.tsx: 3 occurrences
Using raw <img> elements in a Next.js app bypasses built-in image optimization and triggers lint warnings. Replacing them with Image from next/image would align the codebase with Next.js best practices.
Note:
Some usages, especially in MDX-related rendering, may require additional handling and should be updated carefully rather than through a blind replacement.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
检查 src/components/Layout/HomeContent.js 和 src/components/MDX/MDXComponents.tsx,然后运行 lint 命令以审查报告的七处问题。将合适的原始 img 元素替换为 next/image,同时谨慎处理 MDX 渲染,并确认 @next/next/no-img-element 警告已解决。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript, next.js
- 领域
- documentation, frontend
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 冷清
- 描述清晰度
- 基本清楚
- 新手友好度
- 68/100