avif-format
它能做什么
这项技能检查网站是否为支持的浏览器提供 AVIF 图片。适合希望图片更小、页面更快的开发者。
适用场景
- ✓当你的网站提供较大的 JPEG 或 PNG 照片时。
- ✓当你想加入 AVIF 图片,并为旧浏览器保留备用格式时。
- ✓当图片体积导致页面速度变慢时。
技能链接
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/avif-format/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请为我的产品图库设置 AVIF 图片,并为旧浏览器保留 JPEG 备用格式。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会在 picture 元素中添加 AVIF 来源,并设置 WebP 和 JPEG 备用格式,使每个浏览器都能获得它支持的格式。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Use AVIF format for modern browsers
AVIF provides the best compression available—50% smaller than JPEG and 20% smaller than WebP—dramatically reducing bandwidth and improving load times.
Quick Reference
- AVIF offers 50% better compression than JPEG
- Even better than WebP for photographic images
- Use picture element with WebP and JPEG fallbacks
- Browser support: Chrome, Firefox, Safari 16+, Edge
Check
Check if the website supports AVIF format for even better compression than WebP.
Fix
Implement AVIF support with proper fallbacks for browsers that don't support it.
Explain
Explain how AVIF provides 50% better compression than JPEG with superior quality.
Code Review
Review image assets, markup, and delivery configuration related to Use AVIF format for modern browsers. 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/avif-format
常见问题
AVIF 文件能小多少?
这项技能说明,对于照片,AVIF 大约比 JPEG 小 50%,比 WebP 小 20%。
哪些浏览器支持 AVIF?
这项技能列出了 Chrome、Firefox、Safari 16 及更高版本,以及 Edge。
什么是 picture 元素?
它是一种 HTML 元素,让浏览器可以选择它支持的最佳图片格式。
详情
作者的原始描述
Use when reviewing image assets, markup, and CDN or build transforms related to Use AVIF format for modern browsers. Check encoded size, rendered size, loading strategy, and above-the-fold impact together.
热度
- GitHub 星标
- 75k
- 排名
- #2752
- 许可证
- MIT
- 更新时间
- 2026/10/31
评论
- …
同一仓库的更多技能
frontendchecklist
75k使用命令行工具,依据 380 多条关于无障碍、速度、SEO 和安全的规则,检查前端代码和线上页面。
frontend-checklist-global
75k依据全部 386 条 Front-End Checklist 规则审查前端项目,并为发现的每个问题给出具体修复方法。
404-page
75k检查你的页面缺失提示是否提供有用的链接,并返回真正的 404 状态,帮助迷路的访客找到方向。
about-page
75k审查你的网站是否有清晰的关于页面,说明由谁运营,以建立访客和搜索引擎的信任。