Craft

The project gallery

The gallery is the strip of art on the project page, under the heading "Glimpses". It is settings.gallery, a list of up to 48 items, and settings.galleryLayout, the shape they are shown in. Edit it in the Glimpses section of the project page, in edit mode.

[
  {
    "kind": "image",
    "url": "https://media.craft.example/projects/abc/hall-of-echoes.webp",
    "caption": "The Hall of Echoes, an hour before the vote",
    "focalPoint": { "x": 0.42, "y": 0.31 }
  },
  {
    "kind": "image",
    "url": "https://media.craft.example/projects/abc/vellin.webp",
    "caption": "Vellin Ashgrave, first of the exiles"
  }
]

Curating it is the last step of a finished world. Pick from the art the world already has; generate something new only for a gap.

Where the URLs come from

Every URL must be media Craft already hosts: an image that was generated or uploaded, or the picture already on one of the world's files. To find one, click Add media to upload a file, or Add from Studio to pick art you already made in Craft.

Item shape

The item is strict: a key not listed below fails the whole save. A file's image object is not a gallery item. It also carries generation details, variations and a cut-out, which the gallery refuses. Copy its url, and its focalPoint and animation when it has them, into a new item.

Order and layout

Order is meaning. Items fill the layout's places from the first, so in mosaic and featured the first item gets the largest place. A layout with a fixed number of places shows that many; the last one shown gets a "+N more" badge for the rest, and places with no item stay blank. An empty list clears the gallery.

  • Match the number of items to the layout: filmstrip for a few, mosaic or featured when you have six or five.
  • Mix the shots: a landscape, a face, an object and a scene read better than four portraits that look alike.
  • Write a caption for each item. It is display copy, one line that makes a visitor want the world.

Click Edit on the project's home page. Beside the Glimpses heading, pick a layout and add items. On each card, write a caption, move it or click Set as hero, and drag its dot to what must stay in frame.

Item fields

kind

What the item is: a still image, a GIF or a video.

Key Type Required Limits
kind "image" | "gif" | "video" yes

url

The item's media URL. It must be media Craft already hosts: a generated or uploaded image, or the URL on a file's picture.

Key Type Required Limits
url string yes a URL

Copied from a generated image, an upload, or a file's image.url.

caption

One line shown with the item. It is display copy, not alt text: a line that makes a viewer want the world.

Key Type Required Limits
caption string at most 280 characters

animation

Only for moving items: the poster image and video URLs that play it.

Key Type Required Limits
animation { kind, posterUrl, mp4Url, webmUrl? }
animation.kind "animated_gif" | "generated_video" yes
animation.posterUrl string yes a URL
animation.mp4Url string yes a URL
animation.webmUrl string a URL

Copy it whole from the image object of an animated picture. Example:

{
  "kind": "video",
  "url": "https://media.craft.example/projects/abc/storm.mp4",
  "caption": "The season turns",
  "animation": {
    "kind": "generated_video",
    "posterUrl": "https://media.craft.example/projects/abc/storm-poster.webp",
    "mp4Url": "https://media.craft.example/projects/abc/storm.mp4"
  }
}

focalPoint

The point kept in frame when a layout crops the item, from 0 to 1 across (x) and down (y). Set it when the subject is off center.

Key Type Required Limits
focalPoint { x, y }

{ "x": 0.5, "y": 0.5 } is the center. Copy it from the image object when it has one.

Layouts

mosaic

The default. A magazine spread: one large item on the left, five smaller ones beside and below it.

Value Items shown
"mosaic" the first 6

Give it six items. With fewer, the places left over stay blank.

One large item on the left and four small ones stacked on the right.

Value Items shown
"featured" the first 5

Put the hero image first; the four after it are cropped to small tiles.

grid

An even grid, four across and three rows down.

Value Items shown
"grid" the first 12

Use it only for many items of the same kind, such as a cast.

filmstrip

One row of tall 3:4 cards that scrolls sideways. It shows every item.

Value Items shown
"filmstrip" all, in one scrolling row

Its cards are tall, so portraits crop better than wide landscapes.