Skip to content

Facebook link previews can render without the Open Graph image #251

Open

Description

@aistomin

Problem

A Facebook post linking to https://aistomin.com/ shows the preview without an image
(and with the pre-redesign title/description). The root cause of that particular post
is Facebook's cache: the link was shared on 2025-10-16, before Open Graph tags were
added to the site (2025-11-19), so Facebook cached a text-only preview. The cache has
since been refreshed via the Sharing Debugger
("Scrape Again") and new shares now render correctly; previews baked into already
published posts do not update retroactively.

However, the layout has real gaps that will reproduce the symptom for future shares:

  1. og:image:width, og:image:height and og:image:alt are missing. Without declared
    dimensions Facebook fetches the image asynchronously on the first scrape, so the
    first share of any freshly-scraped URL renders without the image.
  2. Pages without image front matter emit no og:image at all. The page-specific
    images for About and Certificates are tracked in "About" page. Fix/optimise OG tags #103 and "Certificates" page. Fix/optimise OG tags, change the picture #106; a site-wide fallback
    in the layout would additionally cover any future page that forgets to set one.
  3. og:site_name and og:locale are missing (minor).

Proposal

  • In _layouts/default.html, always emit an og:image (page image with a site-wide
    fallback, e.g. the home OG image), plus og:image:width/og:image:height
    (all OG images are 1200×630) and og:image:alt.
  • Add og:site_name and og:locale.
  • Extend the Playwright specs to assert the OG image meta (including the fallback on
    pages without their own image).
  • Document in the README or CLAUDE.md that after OG changes, Facebook's cache must be
    refreshed via the Sharing Debugger.

Related: #103, #106 (page-specific OG images), #164, #193 (OG image artwork/compression).

Please read how to contribute

Activity

  1. added this to the Version 1.2 milestone on Sep 11, 2026
  2. self-assigned this
    on Sep 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions