Skip to content

[Bug]: Replace <img> tags with next/image to satisfy Next.js lint warnings #8416

Description

@theibrahim

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.js
  • src/components/MDX/MDXComponents.tsx

Warning count:

  • HomeContent.js: 4 occurrences
  • MDXComponents.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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions