Overview

Image Schema

s.image()

Images. Use s.image for schema, then c.image for content. Also note by adding .remote you can enable remote images

Options:
accept: string

The accept value is a comma-separated list of one or more image types, or unique file type specifiers, describing which file types to allow.

s.image({ accept: "image/webp" })
Methods:
.validate: method

Custom validation function

.remote: method

Enable remote images

Example:
Example
const schema = s.image();
export default c.define("/content/image.val.ts", schema, 
  c.image("/public/val/hero.jpg", { //  NOTE: the actual files must be in the public/val folder
    width: 1200,
    height: 800,
    alt: "Hero image"
  }
)