GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — chore(mdx): 显式豁免 no-img-element,文档图片改为懒加载 by longsizhuo · Pull Request #400 · InvolutionHell/involutionhell

Conversation

@longsizhuo

@longsizhuo longsizhuo commented Sep 29, 2026

Copy link
Copy Markdown
Member

背景

mdx-components.tsx 有一条 eslint warning @next/next/no-img-element,建议改用 next/image。

为什么不换 next/image

  • next.config 里设了 images.unoptimized: true(Vercel 图片优化额度已用完),换成 next/image 也不会有任何优化。
  • 文档里的外链图片没有 width/height(source.config.ts 里 external: false),next/image 会在运行时报错。

所以保留原生 <img>,和仓库里其他 5 处写法一致,用 eslint-disable-next-line 加一行说明。

改动

  • 显式豁免这条 lint 规则,消掉 warning
  • 加 loading="lazy" 和 decoding="async",首屏以外的图片等滚动到了才加载,减少带宽。props 放在后面展开,单张图片仍然可以覆盖这两个属性

验证

  • eslint 对这个文件不再报任何问题;prettier 和 tsc --noEmit 通过
  • pre-commit:vitest 89/89 通过,图片检查和 lockfile 检查通过

🤖 Generated with Claude Code

https://claude.ai/code/session_014zBGrQgQnx1eLA9jQfSJWD


Generated by Claude Code

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@claude
chore(mdx): 显式豁免 no-img-element,文档图片改为懒加载
9511518
images.unoptimized=true 下 next/image 不做任何优化,且外链图片缺
width/height 会运行时报错,保留原生 <img>(与仓库其余 5 处一致用
eslint-disable-next-line)。同时加 loading="lazy" / decoding="async",
首屏外图片延迟加载以减少带宽;props 在后展开,个别图片仍可覆盖。

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014zBGrQgQnx1eLA9jQfSJWD
@vercel

vercel Bot commented Sep 29, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
involutionhell-github-io Ready Ready Preview Sep 29, 2026 2:28pm UTC
website-preview Ready Ready Preview Sep 29, 2026 2:28pm UTC
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vercel
vercel Bot deployed to Preview – involutionhell-github-io September 29, 2026 14:25
View deployment
@vercel
vercel Bot deployed to Preview – website-preview September 29, 2026 14:28
View deployment

This branch was successfully deployed

2 active deployments
Preview – website-preview — 95115183 Deployed Sep 29, 2026 by vercel[bot]
View deployment
Preview – involutionhell-github-io — 95115183 Deployed Sep 29, 2026 by vercel[bot]
View deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@longsizhuo @claude
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.