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

optimized

Skill này làm gì

Skill này kiểm tra các tệp ảnh trong dự án xem có vấn đề về dung lượng không và tối ưu hóa khi có lợi. Skill dành cho người xây web muốn trang nhẹ hơn mà không làm thay đổi cách ảnh hiển thị.

Khi nào nên dùng

  • ✓Khi bạn yêu cầu agent giảm dung lượng các ảnh trong dự án.
  • ✓Khi báo cáo hiệu năng cho thấy ảnh có thể được mã hóa hiệu quả hơn.
  • ✓Khi bạn chuẩn bị ảnh để phát hành và muốn bỏ siêu dữ liệu thừa cùng các dấu vết từ trình chỉnh sửa.

Liên kết skill

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/optimized/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/optimized/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

“Ảnh trên website của tôi rất lớn. Bạn có thể tối ưu chúng để trang tải nhanh hơn mà không mất chất lượng không?”

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

Cách hoạt động

Agent xem từng ảnh về siêu dữ liệu, cài đặt mã hóa và nội dung không cần thiết. Sau đó agent mã hóa lại tệp JPEG với chế độ progressive, nén PNG và làm sạch SVG, rồi báo dung lượng hiện tại và mức tiết kiệm ước tính cho từng ảnh.

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.

Optimise images for faster loading

Unoptimised images are the most prevalent cause of page bloat. A DSLR-quality JPEG with EXIF data can be 8MB; the same image optimised for web delivery is under 200KB with no visible quality difference. Lighthouse's 'Efficiently encode images' audit reports potential savings that, when fixed, directly improve LCP and reduce bandwidth costs.

Quick Reference

  • Strip EXIF metadata from all JPEG/WebP images before deployment—it adds unnecessary bytes
  • JPEG: quality 80 with progressive: true (mozjpeg); PNG: run pngquant at quality 65-80
  • SVG: run through SVGO to remove editor artefacts and reduce file size
  • Lighthouse flags images reducible by 4KB+ as 'Efficiently encode images' opportunities

Check

Audit all image assets in this project for optimisation issues: 1) Run Lighthouse and check the 'Efficiently encode images' audit—it flags images that could be reduced by 4KB or more. 2) Check if JPEG images use progressive encoding (better perceived performance). 3) Check if images retain EXIF/IPTC metadata (adds unnecessary bytes). 4) Check if PNG images could be quantised (pngquant) for smaller files. 5) Check if SVG files contain unnecessary editor metadata, comments, or redundant attributes. Report each image with its current size and estimated savings.

Fix

For each unoptimised image: 1) JPEG: re-encode with mozjpeg at quality 80 with progressive=true. 2) PNG: run pngquant at quality 65-80 for lossy compression, or oxipng for lossless. 3) WebP: encode at quality 80. 4) AVIF: encode at quality 60 with effort 6. 5) SVG: run through SVGO to remove editor metadata, comments, and redundant attributes. 6) Strip EXIF metadata from all JPEG/WebP images. For each image, show the before/after file size and percentage reduction.

Explain

Explain what image optimisation means technically. JPEG compression works by converting pixel data to frequency components (DCT) and quantising the high-frequency data—quality settings control how aggressively this quantisation occurs. PNG uses lossless DEFLATE compression, but colour quantisation (pngquant) can massively reduce file size with minimal visible change. EXIF metadata (GPS, camera model, timestamps) adds kilobytes to images with no benefit for web users. Progressive JPEG encoding allows the browser to show a low-resolution version immediately while the full image loads, improving perceived performance.

Code Review

Review image assets, markup, and delivery configuration related to Optimise images for faster loading. 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/optimized

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

Ảnh có bị xấu đi không?

Skill nói mục tiêu là không có khác biệt nhìn thấy được, dùng các cài đặt như chất lượng JPEG khoảng 80.

Công cụ nào được dùng?

Skill nêu mozjpeg cho JPEG, pngquant cho PNG và SVGO cho tệp SVG.

Làm sao agent biết ảnh nào cần sửa?

Skill gợi ý chạy kiểm tra Lighthouse, công cụ này đánh dấu các ảnh có thể giảm được từ 4 KB trở lên.

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 Optimise images for faster loading. 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
#2962
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ự