A shared link can open the right page and still show the wrong image. That's the problem I want to solve before I send a page to anyone. If you're learning how to create Open Graph tags, I would start with the information a sharing platform actually receives: the title, image, page address, and description. I'll show you how I prepare those values, put them in the right place, and check the published page without assuming that a saved setting means a working preview.
What are Open Graph tags, and what do they control?
I think of Open Graph metadata as the introduction attached to your page when someone shares its address. It gives a platform explicit values to consider instead of leaving it to choose from the page. These values sit in the HTML head, separate from the article text your reader sees.
What I can influence, but cannot promise
I can supply the title, summary, image, and page identity I want a platform to use. But I can't promise identical cards on Facebook, LinkedIn, and messaging apps. Each service can shorten text, crop images, cache an earlier version, or apply its own display rules. I aim for a clear source of information, not pixel-for-pixel control everywhere.
I also keep social previews separate from search claims. I don't treat Open Graph tags as a Google ranking shortcut. Google's SEO Starter Guide says it may use your meta description for a search snippet, or choose text from the page instead. That's a different job from supplying a social card.
Which Open Graph tags are required?
I separate protocol requirements from useful extras because mixing them makes setup confusing. The Open Graph protocol requires four properties. A description is useful, and LinkedIn asks for one in its sharing guidance, but the protocol doesn't list it among those four.
| Property | Protocol status | What I put there |
|---|---|---|
| og:title | Required | The title for this specific page |
| og:type | Required | A suitable content type, such as website or article |
| og:image | Required | The full public URL of the preview image |
| og:url | Required | The intended canonical page URL |
| og:description | Optional | An accurate summary in one or two sentences |
| og:image:alt | Recommended by the protocol with an image | A description of what the image shows |
| og:image:width and og:image:height | Optional | The image's actual pixel dimensions |
| og:image:type | Optional | The image's actual media type |
Why I check og:url carefully
The protocol defines og:url as the canonical URL and permanent identifier for the object. I use the final page address I want shared, rather than a temporary preview address or a tracking version. If the site redirects to another address, I check that the final destination and intended canonical address agree with this value.
I can also include og:site_name and og:locale when they fit the page. For locale, I choose the page's actual language and territory rather than copying a value from an unrelated example. Optional metadata should describe the page, not just fill space.
How do I create Open Graph tags with Meta Tag Generator?
I built Meta Tag Generator, and I tried the preparation steps here with it. I test my tools on a budget Android phone and a laptop. My rule is simple: a generator helps prepare metadata, but I still inspect what reaches the live page. Generating text isn't the same as publishing it.
- I open Meta Tag Generator and prepare the page title and description.
- I use the real page topic, not a sitewide label.
- I write a summary that explains what you can do or learn on the page.
- I prepare the final page URL and a full public image URL alongside the text.
- I avoid a temporary preview page.
- I make sure the image address opens the image itself, not an editing screen.
- I review the generated output rather than copying it blindly.
- I check which Open Graph properties are included.
- If a property isn't provided, I supply it through my page template or CMS social settings.
- I compare the result with the required-properties table before publishing.
- I check the title, type, image, and canonical URL separately.
- I add the description and image alt text where my publishing setup supports them.
- I publish the page, inspect its fetched HTML, and test the preview.
For wording checks, I use Character Counter, but I don't chase a supposed universal Open Graph character limit. Display space varies. I put the useful words first so the title still makes sense if a platform cuts off the ending.
Tip from me: I keep the page URL and image URL next to each other while checking. Mixing them up can leave og:image pointing at a webpage rather than an image file.
What should an Open Graph tags example contain?
I find a small property map easier to check than a long block of unfamiliar markup. Here's an example for a fictional recipe page. These are example values, not a claim about a live website. I would replace every value with the matching details from my own page.
| Property | Example value |
|---|---|
| og:title | Simple Tomato Soup Recipe |
| og:type | article |
| og:url | https://example.com/recipes/tomato-soup/ |
| og:image | https://example.com/images/tomato-soup.jpg |
| og:description | Make tomato soup with clear cooking steps and serving suggestions. |
| og:image:alt | A bowl of tomato soup beside a slice of bread |
How I turn those values into page metadata
For an HTML implementation, each row becomes a meta element inside the head. The property attribute contains the Open Graph name, such as og:title. The content attribute contains its value, such as Simple Tomato Soup Recipe. The table itself isn't HTML to paste into your site. I use generated markup or my template's metadata controls to produce the actual elements.
I keep titles and descriptions as plain text values. If I build markup myself, I make sure special characters are escaped correctly by the template system. A quotation mark inside a title must not break the surrounding attribute. After publishing, I inspect the resulting value, not just the text I typed into the editor.
What Open Graph image size should I use?
I don't present one image size as a rule for every platform. LinkedIn's website sharing guidance specifies minimum dimensions of 1200 x 627 pixels, a recommended 1.91:1 aspect ratio, and a maximum file size of 5 MB for organic sharing. Those are LinkedIn's figures, not universal Open Graph requirements.
How I prepare the picture and its crop
I choose an image that represents the individual page. Then I keep essential words and subjects away from the edges. LinkedIn notes that square or vertical images might be cropped, and images less than 401 pixels wide display as thumbnails. A large file alone doesn't solve a poor crop or tiny text.
- I use Image Resizer to adjust dimensions without confusing pixels with file size.
- I use Image Compressor if the file is too large for the platform's stated limit.
- I check the finished image, then use its actual dimensions and media type in any supporting image properties.
- I add alt text that describes the image instead of repeating unrelated promotional wording.
You can open Image Resizer and Image Compressor for those separate jobs. I check both dimensions and file weight after exporting. I also open the final uploaded image URL, because a good local file can't help if its public address is broken or protected.
How do I add Open Graph tags to my website?
I choose the editing route based on what already creates the page head. Adding another metadata system without checking the existing one can leave competing tags. My preference is one clear owner for social metadata, with page-specific values supplied through that system.
| Website setup | Where I would start | What I would verify |
|---|---|---|
| Static HTML or a template-based site | The page head or shared head template | Each page receives its own values |
| CMS with social sharing settings | The page's social or SEO settings | Saved settings appear in the fetched HTML |
| CMS using an SEO plugin | The plugin already responsible for metadata | The theme isn't adding conflicting tags |
| JavaScript-rendered website | The framework's server or build metadata system | The initial HTML response contains the tags |
What I check on CMS and JavaScript sites
On a CMS, I look for the existing social title, description, and image controls before editing theme files. Exact menu names depend on the product and plugin, so I wouldn't tell you to click a menu I haven't verified. Whatever the controls are called, I confirm their output on the published page.
On a JavaScript site, I don't rely only on tags that appear after the browser runs scripts. The platform crawler needs metadata in the HTML it fetches. I prefer server-rendered or build-generated metadata, then inspect the initial response. Seeing the right tags in the browser's updated page tree isn't enough by itself.
How can I check whether Open Graph tags are working?
I test the published address, not just a local page or editor preview. First I open it without being signed in. Then I inspect the page source or fetched HTML and search for og:. On a laptop, viewing source is usually the easier check. On my phone, I can still check public page and image access.
- I confirm the final page address after any redirects.
- I compare the fetched title and description with the current page content.
- I inspect og:url and the intended canonical address for disagreement.
- I open og:image directly and check whether it loads without login or an error.
- I search for duplicate properties, especially conflicting titles and images.
- I test with Facebook Sharing Debugger or LinkedIn Post Inspector for the platform I care about.
Meta's sharing best practices describe Sharing Debugger as a way to inspect what its scraper sees and refresh scraped content. I read the fetched values and access warnings rather than treating a preview picture as the whole result. A successful browser visit doesn't prove the crawler received the same response.
Tip from me: If the shared address redirects, I use Redirect Checker to inspect the path. I fix URL disagreements before repeatedly asking a platform to fetch the same confusing setup.
Why is my link preview missing or showing old content?
I split this problem into access, metadata, and cache checks. That stops me from redesigning an image when the real fault is a blocked request. Both the page and the image need to be reachable by the relevant crawler, not just by me while I'm signed into the site.
- No image: I check the full image URL, public access, response errors, and the target platform's image guidance.
- Wrong image: I check for stale cached data and competing og:image values.
- Old title: I confirm the live HTML changed before requesting a fresh scrape.
- Missing description: I check that og:description has a value, while remembering the platform may choose not to display it.
- Unexpected crop: I check the image composition and the platform's display rules rather than assuming the tags failed.
Why a cache refresh isn't a post edit
Meta describes its crawler as gathering and caching share information. Its cited guidance mentions a standard 24-hour update period, but I don't treat that as a promise that every visible card will change on that schedule. I use the debugger's refresh option after fixing the source, then check what the scraper fetched.
And I distinguish fresh share data from an already-published social post. Refreshing scraped metadata can affect future previews while an existing post retains its earlier card. If a new preview looks right but an old post doesn't change, I don't immediately assume my new tags are broken.
What mistakes should I avoid before publishing?
The mistake I'd fix first is contradictory metadata. The protocol says the first value in document order takes precedence when multiple values conflict. Adding the correct image later in the head may therefore leave an earlier unwanted value in charge. I remove the conflict rather than hoping the platform chooses my preferred tag.
- I don't leave the homepage title and image on every article.
- I don't use relative image paths when I can supply a full public URL.
- I don't let a theme and plugin publish contradictory social metadata.
- I don't promise content in the card that the page doesn't deliver.
- I don't stop checking at the editor's preview or assume every platform will display the same card.
My final pass is a simple comparison: does the fetched title describe this page, does the summary add useful context, and does the image match? Then I confirm the address and access checks. I would rather publish an honest, readable card than spend time making a dramatic image that introduces the wrong thing.
Questions people ask
What Open Graph tags are required?
I use the protocol's four required properties: og:title, og:type, og:image, and og:url. I also normally include og:description and og:image:alt. The distinction matters: a description is useful for sharing, and LinkedIn asks for one, but it isn't one of the protocol's four required properties.
What is the correct size for an Open Graph image?
I choose dimensions for the destination platform rather than claiming a universal size. LinkedIn's organic sharing guidance specifies minimum dimensions of 1200 x 627 pixels, a recommended 1.91:1 ratio, and a maximum file size of 5 MB. I also check the crop, because meeting dimensions doesn't guarantee readable text or an intact subject.
How do I set an Open Graph image for each page?
I assign each page its own og:image value through the page template or CMS social image setting. That value points to the full public address of the relevant image. After publishing, I check separate pages in the fetched HTML to make sure a shared default hasn't overwritten their individual choices.
How can I check whether my Open Graph tags are working?
I inspect the live page's fetched HTML, confirm the required properties, and open the image URL without signing in. Then I use the relevant platform's inspection tool. I compare its fetched title, description, image, and page URL with my intended values, and investigate access warnings or duplicate tags.
Why is Facebook showing the wrong link preview or image?
I check whether Facebook fetched old data, encountered conflicting metadata, or couldn't access the intended image. I fix the live source first, then use Sharing Debugger to inspect and refresh the scraped information. I don't assume that refreshing the cache will rewrite the card on a post that's already published.
Why isn't my link preview image showing on LinkedIn?
I start with og:image and confirm that its full URL loads publicly without login or an error. Then I compare the file with LinkedIn's image guidance and check the fetched page for conflicting tags. I use LinkedIn Post Inspector to investigate rather than relying only on what my signed-in browser displays.
What to do next
I would start with one page, not the whole site. Open Meta Tag Generator, prepare an accurate title and description, and collect the final page and image URLs. Add the four required Open Graph properties through your existing template or CMS, then include the useful description and image details. Publish, inspect the fetched HTML, and test the platform you plan to share on. If the preview is wrong, check access and conflicting tags before changing the design. Once that page works, I would carry the same checked process into the rest of the site.