You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
YouTube links do not generate link previews in v0.31.0 #6399
After adding this URL to a memo, only the link itself is displayed and no preview card is generated.
Other links can generate previews as expected.
I can reproduce the same behavior both on my self-hosted Memos instance and on the official Memos demo.
Expected behavior: YouTube links should generate a preview card with the video title and thumbnail.
In v0.30.0, Memos had a YouTube-specific fallback for www.youtube.com/watch URLs that generated the thumbnail from img.youtube.com.
The link preview implementation was refactored in v0.31.0, and that YouTube-specific fallback no longer appears to be present.
It may also be worth checking common YouTube URL variants such as:
Dug into this: the removed YouTube fallback isn't the whole story. A YouTube watch page is 1.2–1.4 MB and starts with a ~680 KB inline <script>, so <title>, the oEmbed <link> and the og:* tags only show up around 700 KB (checked three videos with the MemosBot/1.0 user agent). fetch() parses only the first maxHTMLMetaBytes (512 KB), finds nothing, and returns an empty preview without an error. Same for youtu.be and m.youtube.com. The demo does the same: /api/v1/memos/-/linkMetadata returns empty fields for the URL in the report and full ones for a GitHub URL.
With the cap bumped to 2 MB locally, title and thumbnail come back through the page's own oEmbed link. So the new code already handles YouTube, it just never gets that far.
v0.30.0 had the same 512 KB cap, the img.youtube.com fallback only hid it (image but no title).
Two ways to fix it: call https://www.youtube.com/oembed?format=json&url=<video url> directly for YouTube hosts (works for watch?v=, youtu.be/, m.youtube.com), or read further than 512 KB, e.g. up to </head>.
Thanks for the detailed report and investigation. The 512 KB HTML limit stopped before YouTube’s metadata and oEmbed link.
We’ve fixed the general preview fetcher: when the first 512 KB lacks a title or image, it reads further, up to a 2 MB limit. And verified the reported video through www.youtube.com, m.youtube.com, and youtu.be; all three returned a title and thumbnail.
Activity
Juice-de-Orange commentedon Sep 29, 2026
Dug into this: the removed YouTube fallback isn't the whole story. A YouTube watch page is 1.2–1.4 MB and starts with a ~680 KB inline
<script>, so<title>, the oEmbed<link>and theog:*tags only show up around 700 KB (checked three videos with theMemosBot/1.0user agent).fetch()parses only the firstmaxHTMLMetaBytes(512 KB), finds nothing, and returns an empty preview without an error. Same foryoutu.beandm.youtube.com. The demo does the same:/api/v1/memos/-/linkMetadatareturns empty fields for the URL in the report and full ones for a GitHub URL.With the cap bumped to 2 MB locally, title and thumbnail come back through the page's own oEmbed link. So the new code already handles YouTube, it just never gets that far.
v0.30.0 had the same 512 KB cap, the
img.youtube.comfallback only hid it (image but no title).Two ways to fix it: call
https://www.youtube.com/oembed?format=json&url=<video url>directly for YouTube hosts (works forwatch?v=,youtu.be/,m.youtube.com), or read further than 512 KB, e.g. up to</head>.fix(httpgetter): fetch YouTube link previews via oEmbed
johnnyjoygh commentedon Oct 9, 2026
Thanks for the detailed report and investigation. The 512 KB HTML limit stopped before YouTube’s metadata and oEmbed link.
We’ve fixed the general preview fetcher: when the first 512 KB lacks a title or image, it reads further, up to a 2 MB limit. And verified the reported video through
www.youtube.com,m.youtube.com, andyoutu.be; all three returned a title and thumbnail.