Facebook Links and Open Graph: Make Your Links Look Great on Facebook
Facebook gets the title, text and image of a shared link from the Open Graph tags in the page's <head>. Set og:title, og:description, og:image and og:url, use an image of at least 1200 x 630 px, and run the page through Facebook's Sharing Debugger so Facebook fetches them again.
If you have shared a link and seen the wrong image, a strange title or no preview at all, it is almost always because the tags are missing or Facebook has stored an old version.
What Is Open Graph?
Open Graph is a protocol from Facebook that lets you decide how a page looks when someone shares it. Facebook's own documentation (developers.facebook.com, read 22/11/2026) describes the tags, and other services such as LinkedIn use them too (linkedin.com, read 22/11/2026).
Without tags Facebook guesses. With tags you decide image, title, description and URL.
The Four Most Important Tags
og:title
The title in the preview. Keep it short and concrete so it doesn't get cut off.
<meta property="og:title" content="10 tips for faster WordPress" />og:description
The description under the title. Facebook says it is typically two to four sentences (developers.facebook.com, read 22/11/2026). Put the most important part first.
<meta property="og:description" content="Ten concrete steps to a faster WordPress site." />og:image
The image in the preview and the tag that matters most for whether people click. Facebook's requirements (developers.facebook.com, read 22/11/2026):
- At least 200 x 200 px is the minimum allowed
- At most 8 MB
- At least 1200 x 630 px for good display on high-resolution screens, and at least 600 x 315 px to get a large image in the feed
- The aspect ratio should be close to 1.91:1 if the image should not be cropped
- The types in the documentation are JPEG, GIF and PNG, so use JPG or PNG, not WebP or AVIF
- The server must be able to answer with gzip or deflate
<meta property="og:image" content="https://yoursite.com/images/facebook-preview.jpg" /><meta property="og:image:width" content="1200" /><meta property="og:image:height" content="630" />If you specify width and height, Facebook can show the image the first time the link is shared. Otherwise the first shared link may be missing its image.
og:url
The canonical address of the page.
<meta property="og:url" content="https://yoursite.com/blog/fast-wordpress" />Useful Extra Tags
<meta property="og:type" content="article" /><meta property="og:site_name" content="Your company name" /><meta property="og:locale" content="en_US" />Setup in WordPress
WordPress doesn't add Open Graph tags itself, so you need an SEO plugin or to add them manually. I use SEOPress most often. Prices and menus change, so see the plugin's own documentation if something doesn't match.
SEOPress
Go to SEO, Social Networks and turn on Open Graph (seopress.org, read 22/11/2026). On an individual page you can change title, description and image in the box at the bottom of the editor, under the social media tab.
Yoast SEO and Rank Math
Both plugins set Open Graph tags and let you adjust them per page. The settings are under the plugin's social settings, but the menu names change between versions, so follow the plugin's own guide.
Manually
If you use no SEO plugin, you can add tags in a small plugin or in your child theme's functions.php:
function add_og_tags() { if ( ! is_singular() ) { return; } $title = get_the_title(); $description = wp_strip_all_tags( get_the_excerpt() ); $image = get_the_post_thumbnail_url( get_the_ID(), 'large' ); $url = get_permalink(); echo '<meta property="og:title" content="' . esc_attr( $title ) . '" />'; echo '<meta property="og:description" content="' . esc_attr( $description ) . '" />'; if ( $image ) { echo '<meta property="og:image" content="' . esc_url( $image ) . '" />'; } echo '<meta property="og:url" content="' . esc_url( $url ) . '" />'; echo '<meta property="og:type" content="article" />';}add_action( 'wp_head', 'add_og_tags' );Don't use the manual solution together with an SEO plugin, or you get the tags twice.
Troubleshooting
Sharing Debugger
Facebook's Sharing Debugger (developers.facebook.com/tools/debug) shows which tags Facebook's crawler reads and which errors and warnings it finds. It also triggers a new fetch of the page, so you can use it to update Facebook's version (developers.facebook.com, read 22/11/2026).
Typical Problems
Wrong or old image. Facebook stores images by their URL and doesn't update them until the URL changes. Save the new image under a new file name and run the page through Sharing Debugger again.
No image the first time. The crawler must have seen the image at least once. Run the page through Sharing Debugger before you share, or specify og:image:width and og:image:height.
No preview. Check that the tags are in <head>, that the page is not behind a login, and that Facebook's crawler isn't blocked by your robots.txt or a firewall. The crawler's name and details are at developers.facebook.com/docs/sharing/webmasters/crawler.
Wrong title or text. When the tags exist, Facebook uses Open Graph tags, not <title> and meta description. Fix the tags and scrape again.
Other Platforms
LinkedIn reads Open Graph tags: og:title, og:image, og:description and og:url. Images wider than 400 px are shown as a large image, smaller ones as a thumbnail (linkedin.com, read 22/11/2026).
X (formerly Twitter) has its own twitter: tags, for example twitter:card with the value summary_large_image for a large image. Set them if you want to control the display.
<meta name="twitter:card" content="summary_large_image" />Pinterest uses Open Graph or Schema.org for article rich pins (help.pinterest.com, read 22/11/2026).
Checklist
og:title,og:descriptionandog:urlon every pageog:imageat least 1200 x 630 px, JPG or PNG, under 8 MB- Absolute URLs with
https:// og:image:widthandog:image:heightset- Tested in Sharing Debugger
- A default image for pages without their own image
Conclusion
Setting up Open Graph with an SEO plugin takes little time, and it makes every share of your site look better. Remember to scrape again each time you change the image or text.
If you need help with social media shareability or SEO on the site, you can contact me.
