Chuyển đến nội dung
Skillpedia
Mạng xã hội75k · #2959

og-image-size

Skill này làm gì

Skill này kiểm tra ảnh Open Graph dùng khi trang được chia sẻ trên mạng xã hội và đổi kích thước nếu nó không đạt yêu cầu phổ biến. Skill dành cho người chia sẻ nội dung website trên các nền tảng mạng xã hội.

Khi nào nên dùng

  • ✓Khi bạn yêu cầu agent kiểm tra hoặc tạo ảnh chia sẻ cho các trang của bạn.
  • ✓Khi liên kết chia sẻ hiện ảnh xem trước trống, bị cắt hoặc mờ.
  • ✓Khi bạn chuẩn bị một trang mới và muốn ảnh chia sẻ của nó vừa với các nền tảng mạng xã hội.

Liên kết skill

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

“Khi tôi chia sẻ liên kết, ảnh xem trước bị cắt hoặc mờ. Bạn có thể kiểm tra và sửa kích thước ảnh chia sẻ không?”

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

Cách hoạt động

Agent tìm thẻ og:image, tải ảnh và kiểm tra chiều rộng, chiều cao, tỷ lệ khung hình và dung lượng tệp. Sau đó agent gợi ý hoặc tạo một phiên bản 1200 x 630 điểm ảnh, thêm thẻ kích thước và dùng địa chỉ HTTPS tuyệt đối.

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.

OG Image Size

An incorrectly sized og:image is displayed poorly or not at all on social platforms—Facebook, Twitter/X, LinkedIn each crop or skip images that don't meet their requirements, resulting in blank or distorted link previews.

Quick Reference

  • og:image should be 1200×630 pixels (1.91:1 aspect ratio)
  • Minimum size is 600×315 pixels; smaller images may not display
  • File size should stay under 5 MB; under 1 MB is preferred
  • Use JPEG or PNG; WebP has limited support on older platforms

Check

Find the og:image meta tag in <head> and fetch the image URL. Check the image dimensions and file size. Flag if width < 1200px, height < 630px, aspect ratio differs significantly from 1.91:1, or file size exceeds 5 MB.

Fix

Generate or resize the og:image to exactly 1200×630 pixels. Export as JPEG at 80–85% quality to balance visual quality and file size. Reference the absolute HTTPS URL in the og:image meta tag. Add og:image:width and og:image:height tags to help platforms render the image without downloading it first.

Explain

Social platforms use og:image to construct the visual card shown when a URL is shared. An image too small may be skipped or shown as a thumbnail. An image with the wrong aspect ratio gets cropped, often cutting off important content. The recommended 1200×630 size ensures optimal display across Facebook, LinkedIn, Slack, and iMessage.

Code Review

Check the og:image meta tag value. Fetch the image and verify: (1) dimensions are at least 1200×630 px, (2) aspect ratio is approximately 1.91:1, (3) file size is under 5 MB, (4) URL is absolute HTTPS, (5) og:image:width and og:image:height tags match actual dimensions. Flag relative URLs or images smaller than 600×315 px.


For full implementation details, code examples, and framework-specific guidance, see references/rule.md.

Rule page: https://frontendchecklist.io/rules/seo/og-image-size

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

Ảnh chia sẻ nên có kích thước nào?

Skill khuyên 1200 x 630 điểm ảnh, tức tỷ lệ khoảng 1,91 : 1.

Loại tệp nào tốt nhất?

Skill nói JPEG hoặc PNG, vì WebP được hỗ trợ hạn chế trên một số nền tảng cũ.

Vì sao cần thêm thẻ chiều rộng và chiều cao?

Chúng giúp nền tảng hiển thị ảnh mà không cần tải nó về trước.

Chi tiết

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

Use when auditing Open Graph tags or generating og:image assets. Applies to any page that may be shared on social networks or messaging platforms.

repo: thedaviddias/Front-End-Checklist

Độ phổ biến

Sao GitHub
75k
Vị trí xếp hạng
#2959
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ự