[Bug]: Replace <img> tags with next/image to satisfy Next.js lint warnings
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- JavaScript
- Star
- 11.8k
- Fork
- 7.9k
- Merge trung bình
- 1 ngày 11 giờ
- Pull request đã merge (30 ngày)
- 11
Mô tả
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.
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Kiểm tra src/components/Layout/HomeContent.js và src/components/MDX/MDXComponents.tsx, sau đó chạy lệnh lint để xem xét bảy vị trí được báo cáo. Thay thế các phần tử img thô phù hợp bằng next/image, đồng thời xử lý việc render MDX cẩn thận, và xác nhận rằng các cảnh báo @next/next/no-img-element đã được giải quyết.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- javascript, next.js
- Lĩnh vực
- documentation, frontend
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 68/100