Skip to content

Repeater fields: no image/media subfield support (builder and renderer) #1424

@swissky

Description

@swissky

Summary

Repeater fields cannot contain media-library images. Galleries are a very common content shape (clinic photo gallery, venue gallery, …) and currently the only options are URL/text subfields.

Two places limit this (emdash/admin 0.18.0):

  1. Schema builder — the subfield type select in FieldEditor offers string, text, number, integer, boolean, datetime, select, url (no image).
  2. RendererRepeaterField's subfield switch supports the same scalar set; any other subfield type (including image written directly into validation.subFields) falls through to default: and renders as a plain text Input, while the top-level case "image" uses ImageFieldRenderer with full picker support.

So even though validation.subFields[].type = "image" round-trips fine through the schema/API layer, editors never get a picker inside repeater rows.

What we'd love

image (and probably file) as supported subfield types in repeaters: builder option + ImageFieldRenderer in the row UI, storing the same media value shape as top-level image fields.

Workaround we use today

Gallery repeater keeps a string subfield; our frontend resolves values that aren't URLs as media-library filenames (lookup against the media table → storage key). Works, but editors must type filenames by hand — the media library UI also exposes no copyable URL, so URL subfields are a dead end for non-technical editors.

Happy to discuss/contribute if you can sketch the preferred value shape for media subfields. (Same site/setup as #1413 / #1419 / #1422.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions