og-image-size
What it does
This skill checks the Open Graph image used when a page is shared on social networks and resizes it if it does not meet common requirements. It is for people who share website content on social platforms.
When to use it
- ✓When you ask the agent to check or create the social sharing image for your pages.
- ✓When shared links show a blank, cropped, or blurry preview image.
- ✓When you are preparing a new page and want its share image to fit social platforms correctly.
Skill link
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/og-image-size/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“When I share my links, the preview image looks cropped or blurry. Can you check and fix the sharing image size?”
5 new skills a week. 1 minute to read.
How it works
The agent finds the og:image tag, fetches the image, and checks its width, height, aspect ratio, and file size. It then suggests or creates a version at 1200 by 630 pixels, adds the size tags, and uses an absolute HTTPS address.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
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
FAQ
What size should the share image be?
The skill recommends 1200 by 630 pixels, which is about a 1.91 to 1 aspect ratio.
Which file type is best?
The skill says JPEG or PNG, since WebP has limited support on some older platforms.
Why add width and height tags?
They help platforms show the image without first downloading it.
Details
Original description by the author
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.
Popularity
- GitHub stars
- 75k
- Ranking position
- #2959
- License
- MIT
- Updated
- 10/31/2026
Comments
- …
More skills from this repository
frontendchecklist
75kChecks frontend code and live pages against 380+ rules for accessibility, speed, SEO and security, using a command-line tool.
frontend-checklist-global
75kAudits a frontend project against all 386 Front-End Checklist rules, and gives a specific fix for each issue found.
404-page
75kChecks that your missing-page screen offers helpful links and returns a real 404 status, to help lost visitors find their way.
about-page
75kReviews whether your site has a clear About page that explains who runs it, to build trust with visitors and search engines.
Similar skills
xurl
394kHelps your agent post, reply, search, and read on X, send direct messages, and upload media, using the authenticated xurl tool.
connections-optimizer
280kImproves your social network connections. It suggests who to follow or unfollow and helps create personalized messages to expand your network.
content-engine
280kCreates content for different platforms. It helps produce posts, scripts, and content calendars that work well on networks like X, LinkedIn, and YouTube.