image-cdn
它能做什么
这项技能检查网站上的图片是否来自会对其进行优化的分发服务。适用于管理大量图片的开发者和网站所有者。
适用场景
- ✓当你的网站为每种设备都提供非常大的照片的时候。
- ✓当你希望使用现代图片格式,又不想手动转换文件的时候。
- ✓当你需要为不同屏幕准备多种图片尺寸的时候。
技能链接
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/image-cdn/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请设置图片 CDN,使我的照片自动得到优化。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会检查图片的分发方式,并建议一种可以通过网址参数自动调整尺寸和转换格式的服务。Cloudinary、Imgix、Cloudflare Images 和 Vercel 被列为示例。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Serve images from a CDN
Image CDNs automatically optimize, resize, and convert images on-the-fly—delivering the smallest file in the best format without manual processing.
Quick Reference
- Use image CDN for automatic format conversion (WebP, AVIF)
- Generate responsive sizes on-the-fly via URL parameters
- CDN edge caching delivers images from nearest location
- Popular options: Cloudinary, Imgix, Cloudflare Images, Vercel
Check
Verify if images are served from a CDN or image optimization service.
Fix
Configure an image CDN like Cloudinary, Imgix, or Cloudflare Images for automatic optimization.
Explain
Explain how image CDNs provide on-the-fly optimization, resizing, and format conversion.
Code Review
Review image assets, markup, and delivery configuration related to Serve images from a CDN. Flag exact files or components where format choice, sizing, or loading behavior violates the rule, and describe how to confirm the fix in DevTools.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/rules/images/image-cdn
常见问题
图片 CDN 有什么作用?
它会按需调整图片尺寸并转换格式,并从离每位访客较近的位置提供图片。
提到了哪些格式?
这项技能提到 WebP 和 AVIF 是可以分发的现代格式。
如何生成不同尺寸?
这项技能指出,可以通过网址参数生成响应式尺寸。
详情
作者的原始描述
Use when reviewing image assets, markup, and CDN or build transforms related to Serve images from a CDN. Check encoded size, rendered size, loading strategy, and above-the-fold impact together.
热度
- GitHub 星标
- 75k
- 排名
- #2882
- 许可证
- MIT
- 更新时间
- 2026/10/31
评论
- …
同一仓库的更多技能
frontendchecklist
75k使用命令行工具,依据 380 多条关于无障碍、速度、SEO 和安全的规则,检查前端代码和线上页面。
frontend-checklist-global
75k依据全部 386 条 Front-End Checklist 规则审查前端项目,并为发现的每个问题给出具体修复方法。
404-page
75k检查你的页面缺失提示是否提供有用的链接,并返回真正的 404 状态,帮助迷路的访客找到方向。
about-page
75k审查你的网站是否有清晰的关于页面,说明由谁运营,以建立访客和搜索引擎的信任。