Open Graph Images: Step-by-Step Guide
In this article
Open Graph (OG) images are the preview pictures that appear when a link is shared on social media platforms like Facebook, LinkedIn, and X (formerly Twitter). Without one, platforms often grab a random, low-quality screenshot or show no image at all, making your link look unprofessional and reducing click-through rates. This guide walks you through creating a properly sized OG image, adding the necessary meta tags to your webpage, and testing the result.
What You'll Need
- An image editing tool (Canva, Figma, Photoshop, or a free tool like GIMP)
- Access to your website's HTML files (or a CMS that lets you edit the
<head>section, like WordPress with a plugin or theme editor) - A way to upload files to your web server (FTP, cPanel, or your CMS's media library)
- Optional: A URL to a hosting location for the image (absolute URL required)
Step-by-Step
- Design the image at the correct size. The recommended dimensions are 1200 × 630 pixels. This 1.91:1 aspect ratio is the standard for most platforms. Use a high-resolution source (at least 72 DPI) to avoid blurriness on retina displays.
- Add text and branding. Include your page title or a compelling headline. Keep important text within the central "safe area" (roughly 600 × 600 pixels in the middle) because platforms crop the edges differently. Use a readable font and ensure high contrast between text and background.
- Export the image. Save as a PNG or JPG. PNG is better for graphics with text or logos; JPG is smaller for photos. Keep the file size under 8 MB (Facebook's limit). Name the file descriptively, e.g.,
og-guide-1200x630.png. - Upload the image to your server. You need a permanent, publicly accessible URL. Upload it to your site's root directory, an
/imagesfolder, or a CDN. The URL must be absolute (starting withhttps://), not relative. - Add the Open Graph meta tags to your HTML. In the
<head>section of the page you want to share, add the following tags. Replace the example URLs with your own:<meta property="og:title" content="Your Page Title" /> <meta property="og:description" content="A short, catchy description of the page." /> <meta property="og:image" content="https://www.yoursite.com/images/og-guide-1200x630.png" /> <meta property="og:url" content="https://www.yoursite.com/this-page" /> <meta property="og:type" content="website" />
Theog:imagetag is the critical one. Addog:image:widthandog:image:heighttags (1200 and 630) to help platforms process it faster. - Add Twitter Card tags (optional but recommended). For X/Twitter, add:
<meta name="twitter:card" content="summary_large_image" /> <meta name="twitter:image" content="https://www.yoursite.com/images/og-guide-1200x630.png" />
summary_large_imageshows the full-width image. - Upload or save the updated HTML file. If you're using a CMS, paste the tags into the header section via a plugin or theme customizer. If you're editing raw HTML, save the file and upload it to your server.
- Test the result. Use the official debugging tools to check how your link appears:
- Facebook: Sharing Debugger – paste your URL and click "Debug".
- LinkedIn: Post Inspector – similar process.
- X/Twitter: Card Validator – paste your URL.
- Clear the cache. If you've updated an image that was shared before, platforms cache the old version. Use the "Scrape Again" or "Refresh" button in the debugger tools to force a re-fetch.
Common Mistakes
- Using a relative image path. The
og:imageURL must be absolute (fullhttps://URL). A relative path like/images/og.pngwill not work. - Wrong dimensions. Using a square image (e.g., 800×800) or a very tall image will cause platforms to crop it awkwardly. Stick to 1200×630.
- Text too close to the edges. Social platforms crop the left and right sides slightly on mobile. Keep critical text within the central 600×600 pixel area.
- Forgetting to test. The image might look fine in your browser but fail on Facebook due to a timeout or file size issue. Always run the debugger.
- Not adding the tags to every page. If you have a blog, each post needs its own unique
og:imageandog:title. A generic site-wide image is better than nothing but less effective.
Tips
- Use a template. Create a reusable design in Canva or Figma with your logo and color scheme. Swap out the headline for each new post.
- Keep text short. Aim for 4–6 words in large type. The rest of the description goes in the
og:descriptiontag. - Optimize file size. Use a tool like TinyPNG to compress the image without visible quality loss. Faster loading images are processed more reliably.
- Use a dynamic generator. For blogs with many posts, consider a service like Vercel OG or a WordPress plugin that generates images automatically from the post title.
- Include your logo. Place it in a corner, but don't let it dominate the image. The headline should be the focal point.
Troubleshooting
- Image not showing at all: First, verify the image URL is publicly accessible by pasting it into a browser (in incognito mode). If it loads, run the Facebook Sharing Debugger. It will tell you if the image is too large, the URL is unreachable, or the meta tags are missing. Check that you haven't accidentally placed the tags outside the
<head>. - Old image still showing: This is a caching issue. In the Facebook Sharing Debugger, click "Scrape Again". For LinkedIn, use the Post Inspector's "Refresh" button. For X, the Card Validator has a similar option. It may take a few minutes.
- Image is cropped weirdly: Your image is likely not 1200×630, or the important content is too close to the edges. Re-export at the correct size and move text toward the center.
- Debugger says "Couldn't Parse URL": This usually means the server returned an error (like a 404) or the page took too long to respond. Check that the page loads normally and that your server isn't blocking crawlers (check your
robots.txt). - Image works on Facebook but not WhatsApp: WhatsApp has its own cache and sometimes needs the link sent twice. Also, ensure the image is under 300KB for faster WhatsApp loading.
Frequently Asked Questions
What is the exact recommended size for an OG image?
The standard is 1200 × 630 pixels (a 1.91:1 ratio). Some platforms support larger sizes, but this is the safest universal choice.
Can I use a GIF as an OG image?
No. Facebook, LinkedIn, and X do not animate OG images. They will display the first frame as a static image. Use PNG or JPG.
Do I need a separate image for Twitter?
Not necessarily. If you add the og:image tag, Twitter will use it with the summary_large_image card. However, adding the specific twitter:image tag gives you more control and is recommended.
Why is my image blurry on mobile?
You're likely using a small source image that gets stretched. Always start with a 1200×630 canvas. Avoid upscaling a 500×300 image.
How do I create OG images for a dynamic site like a blog?
You have two options: manually create one per post, or use a dynamic generator. Services like Vercel OG or Cloudinary can generate images on the fly using the post title and your branding. Many CMS plugins (like Yoast SEO for WordPress) also offer this feature.
What if I don't have an image editor?
Use a free online tool like Canva. It has pre-made OG image templates (search "Open Graph" in their template library). You can also use a simple HTML page and take a screenshot, though this is less precise.