Localized media alt text + inline rich-text images
Two delivery improvements landed for media and rich text.
Localized altText / title / description on MediaAsset
The GraphQL MediaAsset type now exposes the asset's locale overlay directly:
type MediaAsset {
# …
altText: String # resolved from the MediaAssetLocale overlay
title: String # for the request locale
description: String
}
These resolve against the request locale — the containing entry's locale for an
embedded media field, the link's parent locale for a link asset, or the new locale
argument on the top-level asset(id, locale) query. When no overlay row exists for that
locale, the field is null. Batched through a DataLoader, so selecting it across many
assets stays a single query.
This makes the asset the single, DRY source of alt text — you no longer need a sibling
…Alt field on every media field, and the text localizes with the asset. The REST asset
endpoint (media/{id}?locale=) continues to merge the same overlay.
krios types generate now includes these fields on the generated MediaAsset interface.
Inline rich-text images render with a resolved src
embeddedAsset nodes in a rich-text body now render as a real <img src="…" alt="…">
in the delivery html — the CDN URL is resolved server-side on both the GraphQL and
REST delivery paths. Previously the <img> came back without a src and silently failed
to load, which meant inline images had to be rendered from the raw AST by hand.
embeddedEntry nodes are unchanged: they still render as a
<div data-krios-entry-id="…" data-krios-content-type="…"> placeholder for the client to
hydrate. So inline images now Just Work, and only embedded entries need a custom
component.