Replies: 1 comment
-
|
Opened a concrete first step as a PR: #1504 — adds the SEO image to per-collection sitemaps. The usage-index proposed here would generalise it to all embedded images plus the editor features. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
EmDash currently has no record of where a media item is used. There is no reverse lookup from a media item to the content that references it. This blocks several SEO and editor-experience features. I'd like to propose a small media usage index as a shared foundation.
Today
{ provider, id, ... }) and in Portable Text bodies ({ _type: "image", asset: { _ref, url } }).Proposal: a
_emdash_media_usageindexOn content create/update, extract every media reference (media fields + Portable Text image blocks) and upsert rows into:
search/text-extraction.ts) and media-value normalization.What it unlocks
<image:image>per image actually embedded on the URL (not just the SEO image).Open design questions for maintainers
media_idonly, or also the resolvedstorage_key(so the sitemap doesn't need a second lookup to build a CDN-correct URL)? Note the public URL needs the storage key (<id><ext>), not the bare media id.Relation to the SEO-image sitemap PR
As a concrete, low-risk first step I opened a PR that adds the SEO image to the native per-collection sitemaps (the one image core already knows generically). The usage index above is the natural follow-up that generalises it to all used images and powers the editor features. PR link to follow in a comment.
Disclosure: drafted with AI assistance (Cursor + Claude Opus 4.8).
Beta Was this translation helpful? Give feedback.
All reactions