Skip to content

Feature request: Custom Open Graph thumbnail from frontmatter for shared notes #202

@wis-graph

Description

@wis-graph

Hi, thanks a lot for building and maintaining this awesome plugin! It has become my default way to share Obsidian notes.

I often write notes that summarize YouTube videos and then share those notes in chat apps like KakaoTalk, where the Open Graph (OG) preview (title, description, image) matters a lot. Right now, OG metadata for unencrypted notes works well overall, but the og:image is implicitly chosen from the content (e.g., first image).

For cases like YouTube notes, I would love to explicitly control the OG thumbnail image via frontmatter.

Proposed behavior
If a dedicated thumbnail is defined in frontmatter, use that image for og:image. If not, fall back to the existing logic (first image or current behavior).

Example:

title: "Some YouTube video summary"
share_unencrypted: true
thumbnail: "[[youtube-thumbnail.png]]"

The plugin would:

Detect thumbnail in frontmatter.

Resolve the Obsidian-style image link ([[...]]) to the actual shared asset URL, similar to how other images are handled today.

Emit that resolved URL as the value.

If thumbnail is not present, nothing changes and the current OG image selection logic continues to work as before.

Why this helps
Allows precise control over the preview image when sharing notes to social/chat platforms that rely heavily on OG previews (KakaoTalk, Discord, etc.).

Especially useful for YouTube or article summaries where a custom thumbnail gives much clearer context than the first inline image.

Implementation-wise, this should be a small incremental change (essentially a conditional check for a frontmatter field plus one code path to resolve the image link to a URL).

If this sounds reasonable, I’m happy to provide more detailed examples or test a beta build. Thanks again for all your work on Share Note!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions