Image

The Image Field lets you upload or reference an image file stored in configured storage (local or cloud).

Installation

Included in Headcode CMS Starter, no setup needed.

Usage

imageSection.tsx
export const imageSection = {  name: 'image',  label: 'Image Section',  fields: {    image: ImageField({      label: 'Main Image',    }),  },};

Options

imageSection.tsx
ImageField({  label: 'Image',  options: {    accept: { 'image/*': [] },    maxSize: 1024 * 1024 * 10,    minSize: 1024,  },});