# SW Open Graph (meta tags) — AI Agent Documentation **Asset type:** Theme partial (`templateType: none`) — not a drag-and-drop module **Partial path:** `smithworks-2025/sw-partials/sw-open-graph.html` (smithworks portal); source of truth in master `SW-Dev/sw-master/sw-partials/sw-open-graph.html` **Included from:** `templates/header.html` immediately after `` (before favicon and `standard_header_includes`) **Master version number:** 2026.05.05.21.50 **Last updated:** 2026.05.05 --- ## 1. Overview The partial outputs **Open Graph** and **Twitter Card** tags for social previews and SEO tools: - **`og:type`** — `article` when `content.CMSContentType == 'BLOG_POST'`; otherwise `website`. - **`og:image`**, optional **`og:image:width`**, **`og:image:height`**, **`og:image:alt`** - **`twitter:image`**, **`twitter:image:alt`**, **`twitter:card`** = `summary_large_image` (only when an image URL is resolved) HubSpot’s **`standard_header_includes`** continues to supply typical **`og:title`**, **`og:description`**, **`og:url`** where configured. --- ## 2. Image resolution order (first match wins) 1. **`content.featured_image`** — website page, landing page, or blog post featured image (string URL or image object with `src` / `url`). 2. **Blog listing pages:** **`contents[0].featured_image`** — the first post in HubSpot’s **`contents`** collection for **this** response (main blog page, paginated pages, tag listings, etc.). 3. **Theme → Content → Misc → Featured image** — site default when the page/post has no featured image and step 2 does not apply or the first post has no image. --- ## 3. Marketer actions - Set a **default share image** under **Theme settings → Content → Misc → Featured image** so pages without their own image still get **`og:image`**. - For blog **listing** URLs without a page featured image, the preview image comes from the **first visible post** on that listing (which updates as you publish). - Per-page **featured image** in the page editor overrides the listing and theme defaults when present. --- ## 4. Related - **SW SEO Schema** (`sw-seo-schema.html`) — JSON-LD Organization / WebSite; runs **after** `standard_header_includes`, not Open Graph. - **`module-documentation/SW-SEO-Schema.txt`**