Chuyển đến nội dung
Skillpedia
Hình ảnh và biểu tượng75k · #3033

sprite-generation

Skill này làm gì

Skill này rà soát các hình ảnh và icon nhỏ trên website và gợi ý gộp chúng thành sprite hoặc chuyển sang icon SVG. Nó dành cho người làm website muốn ít yêu cầu tải hình đồ họa nhỏ hơn.

Khi nào nên dùng

  • ✓Khi bạn yêu cầu agent giảm số lượng yêu cầu hình ảnh nhỏ trên một trang.
  • ✓Khi một trang tải hàng chục file icon nhỏ, từng cái một.
  • ✓Khi bạn đang cân nhắc giữa sprite, icon SVG và icon font cho website.

Liên kết skill

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

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/sprite-generation/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Trang của tôi tải hàng chục file icon nhỏ xíu. Bạn có thể gộp chúng hoặc chuyển sang SVG để trang gửi ít yêu cầu hơn không?”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent tìm các hình ảnh và icon nhỏ được dùng trên toàn site. Nó gợi ý hoặc xây dựng một CSS sprite gộp chúng, hoặc chuyển sang SVG nội tuyến hay hệ thống icon SVG, mà skill cho biết thường linh hoạt hơn.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Use image sprites where appropriate

Each image is an HTTP request—combining many small images into one sprite reduces requests, though modern HTTP/2 and SVG icons have reduced this need.

Quick Reference

  • Sprites combine multiple images into one to reduce HTTP requests
  • Modern alternative: SVG icon systems (more flexible)
  • HTTP/2 makes sprites less critical but still useful for small icons
  • Consider inline SVG or icon fonts for most icon use cases

Check

Check if small images and icons are combined into sprites to reduce HTTP requests.

Fix

Create CSS sprites for icons and small images, or migrate to SVG icons.

Explain

Explain how sprites reduce HTTP requests but consider modern alternatives like SVG icons.

Code Review

Review image assets, markup, and delivery configuration related to Use image sprites where appropriate. 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/sprite-generation

Câu hỏi thường gặp

Sprite còn quan trọng với các giao thức web mới không?

Skill cho biết HTTP/2 làm sprite ít quan trọng hơn, nhưng vẫn hữu ích cho các icon nhỏ.

SVG có phải lựa chọn tốt hơn không?

Skill mô tả hệ thống icon SVG linh hoạt hơn và là một lựa chọn hiện đại thay cho sprite.

Còn icon font thì sao?

Skill nhắc tới SVG nội tuyến hoặc icon font như các lựa chọn cho đa số trường hợp dùng icon.

Chi tiết

Mô tả gốc của tác giả

Use when reviewing image assets, markup, and CDN or build transforms related to Use image sprites where appropriate. Check encoded size, rendered size, loading strategy, and above-the-fold impact together.

repo: thedaviddias/Front-End-Checklist

Độ phổ biến

Sao GitHub
75k
Vị trí xếp hạng
#3033
Giấy phép
MIT
Cập nhật
31/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự