Emit og:image from page cover
grep 'property="og:image"' build/**/index.html finds only og:image:type, og:image:width, og:image:height and og:image:alt. The actual og:image and twitter:image are never emitted, even for feature pages
that define cover in their meta.
This is separate from dynamic OG image generation: even without generated images, the existing cover should be published.
Cause
Meta.sveltederivescoverUrlfrom itscoverprop; the root layout renders<Meta />without propsgetPageInfo()inpages.remote.jsreturns title, description, tags, etc. but notcover- The emitted
og:image:typeis hardcoded toimage/pngand 1200x630 regardless of the real cover
Tasks
- Return the cover's largest
img.src(absolute, viaPROJECT_URL) fromgetPageInfo() - Use it in
Meta.svelteforog:imageandtwitter:image; only emit type/width/height when known - Fall back to a static site-wide OG image for pages without a cover
- Add a build-time test that every listed page has an absolute
og:image
Read next
