Skip to content
Strife Docs

Reference Field Reference

fields.assets()

Multiple asset references, optionally restricted by kind.

Multiple asset references. Maps to editor { name: 'str-assets', type: 'assets' }. Output is Asset[] — the canonical asset shape from @strifeapp/types.

Example

TypeScript
fields.assets({
  label: 'Gallery',
  accept: ['image/*', 'video/*'],
  size: 12,
})

Options

OptionTypeRequiredDescription
label
string
Yes
Label shown to editors in Strife Studio.
description
string
No
Tooltip shown to editors.
searchable
boolean
No
Include in the team's search index.
filterable
boolean
No
Allow filtering content lists by this value.
protected
boolean
No
Restrict editing to users with the appropriate permission.
propertyName
string
No
Override the stored property name.
accept
('image/*' | 'video/*' | 'file/*')[]
No
Restrict pickable assets to these kinds. Omit to allow all.
size
number | null
No
Maximum number of assets.
Note:

Only the wildcard form ('image/*', 'video/*', 'file/*') is accepted today — that's a deliberate placeholder for full MIME-type matching ('image/jpeg', 'document/pdf', etc.), which the wire format doesn't support yet. At compile time each wildcard is translated to the numeric code the asset picker actually checks (image/* → 1, video/* → 2, file/* → 3) — there is no string-based filtering on the wire, only these three categories.

No localizable option.

Output type

Asset[].

See also

  • Assets — the same editor, documented from the Strife Studio UI side.