跳到正文
Skillpedia
图片与图标75k · #3086

webp-format

它能做什么

这个技能检查网站提供图片的方式,并建议使用带备用方案的 WebP。它面向希望页面更轻的网站所有者和开发者。

适用场景

  • ✓网站提供的大型 JPEG 或 PNG 图片,改用 WebP 可以更小的时候。
  • ✓添加图片时没有为旧浏览器提供备用方案的时候。
  • ✓性能审计指出页面顶部的图片过重的时候。

技能链接

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/webp-format/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/webp-format/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“我网站上的照片是较大的 JPEG。请帮我改为 WebP,并让它们在旧浏览器中也能正常显示吗?”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会把图片转换为 WebP,并用提供备用方案的 picture 元素包裹它们。然后浏览器会选择它支持的第一种格式。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Use WebP format with fallbacks

WebP is smaller than JPEG and PNG at similar quality—using it reduces page weight by 25-35% for images, improving load times on all devices.

Quick Reference

  • WebP provides 25-35% better compression than JPEG/PNG
  • 97%+ browser support—nearly universal
  • Use picture element for older browser fallbacks
  • Supports transparency (like PNG) and animation (like GIF)

Check

Check if images are served in modern formats like WebP with fallbacks for older browsers.

Fix

Convert images to WebP format and implement proper fallback strategies.

Explain

Explain how WebP provides 25-35% better compression than JPEG and PNG.

Code Review

Review image assets, markup, and delivery configuration related to Use WebP format with fallbacks. 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/webp-format

常见问题

WebP 能小多少?

这个技能说,在相近画质下,WebP 通常比 JPEG 或 PNG 小 25% 到 35%。

WebP 支持透明吗?

支持。这个技能说,它支持像 PNG 一样的透明,以及像 GIF 一样的动画。

为什么要使用 picture 元素?

它为旧浏览器提供一个它们能读取格式的备用图片。

详情

作者的原始描述

Use when reviewing image assets, markup, and CDN or build transforms related to Use WebP format with fallbacks. Check encoded size, rendered size, loading strategy, and above-the-fold impact together.

repo: thedaviddias/Front-End-Checklist

热度

GitHub 星标
75k
排名
#3086
许可证
MIT
更新时间
2026/10/31

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能