Check images

Check member photos and X pictures: match your campaign picture, review with AI, read screenshots, and catch reused photos.

Many quests ask members for a picture. Domino can check it for you, so your team only looks at the unclear ones. For example:

  • "Use our campaign picture as your X avatar." Domino compares the member's X profile picture with yours.
  • "Upload a selfie at our booth." Domino spots the same photo submitted by several people, then AI checks it against your criteria.
  • "Show that you joined our X Community." AI reads the screenshot and Domino compares what it shows with the member's linked X account.

The member gets an answer: accepted, not accepted with a reason, or sent to your team for review when the quest uses review. Images are never served publicly, and the AI reviewer receives copies without location data.

To start from a working quest, install a recipe:

RecipeName in the URLChecks
X profile picturex-profile-pictureThe linked X avatar is your campaign picture, or a customized version AI accepts
Unique photounique-photoAn uploaded photo was not already submitted by someone else, then AI review
X Community screenshotcommunity-screenshotA screenshot shows your Community, membership and the linked X username
pnpm dlx shadcn@4.21.0 add https://snippets.domino.run/r/x-profile-picture.json

Each recipe installs quests/<name>.quest.ts and instructions under docs/snippets/. See start from a snippet.

ToUse
Require your campaign picture as an X avatarcompare against a reference image
Accept a customized version, such as a framed selfiereview with the reference as a second image
Read a screenshot, such as a joined X Communityextract
Catch the same photo submitted by several peopleseen
Get dimensions, format and hashesinspect
Show a quest's accepted photos to your team as a selfie wall or contestA photo gallery

Name an image

Every method takes image references, not files or URLs:

ReferenceImage
{ evidence: ctx.input.photo }The photo the member uploaded with this attempt. Another attempt's upload is refused.
{ x: "profile" }The linked X account's current profile picture, at 400×400. The member must link X first.
{ x: "post", postId, index }The image attached to an X post, where index is its position: 0 (default) to 3. Videos and GIFs use their preview image.
{ asset: "key" }A reference image you deployed with the project.

X images are downloaded only from X's image hosts. X post reads also list attached media in post.media, as { type, url } in post order.

Add reference images

Add reference images to relay.json

List each image with a key and a path relative to relay.json:

{
  "images": [{ "key": "campaign-avatar", "path": "assets/campaign-avatar.png" }]
}

Use JPEG, PNG or WebP files of at most 5 MiB and 25 megapixels, up to 10 per deployment. Commit them with your project.

Deploy

Run domino deploy. The CLI uploads each new file straight to private storage, then previews the deployment with only each file's hash and size; unchanged files are not uploaded again. The platform decodes every image before publication and rejects anything that is not a supported image. The deployment summary lists the published images. Images are never served publicly.

Hosted builds publish the same images from your repository: build them with domino build --hosting-artifacts, as the starters do, or keep domino build --json output unchanged in your build script.

Deploying a key again replaces its image for later checks. Removing an entry from relay.json does not delete the published image. Results that were already captured for an attempt stay unchanged.

Compare two images

compare returns perceptual hash distances between 0 (same picture) and 64:

import {
  x,
  defineQuest,
  settings,
  manual,
  once,
  decision,
} from "@domino-sdk/relay/authoring"

export default defineQuest({
  integrations: [x],
  key: "campaign-avatar",
  title: "Use the campaign picture on X",
  settings: settings.object({}),
  trigger: manual(),
  completion: once(),
  rewards: [],
  async evaluate(ctx) {
    if (!(await ctx.x.connection())) {
      return decision.reject({
        reason: "Connect X, then start a new submission.",
      })
    }

    const match = await ctx.images.compare(
      { x: "profile" },
      { asset: "campaign-avatar" }
    )

    return match.phashDistance <= 8
      ? decision.accept()
      : decision.reject({
          reason: "Set the campaign picture as your X avatar.",
        })
  },
})
ResultMeaning
identicalThe two files have the same bytes.
phashDistanceDifferences in overall structure. Up to about 8 means the same picture resized or re-encoded. Unrelated photos usually differ by 25 or more.
dhashDistanceDifferences in local brightness changes. It reacts more to small edits.

Your quest decides the threshold. Make it a setting so operators can tune it in Console without a code change:

import {
  x,
  defineQuest,
  settings,
  manual,
  once,
  decision,
} from "@domino-sdk/relay/authoring"

export default defineQuest({
  integrations: [x],
  key: "campaign-avatar-tunable",
  title: "Use the campaign picture on X",
  settings: settings.object({
    maxDistance: settings.integer({
      label: "Largest hash distance that counts as the same picture (0–64)",
      default: 8,
      min: 0,
      max: 64,
    }),
  }),
  trigger: manual(),
  completion: once(),
  rewards: [],
  async evaluate(ctx) {
    const match = await ctx.images.compare(
      { x: "profile" },
      { asset: "campaign-avatar" }
    )

    return match.phashDistance <= ctx.settings.maxDistance
      ? decision.accept()
      : decision.reject({
          reason: "Set the campaign picture as your X avatar.",
        })
  },
})

Hashes tolerate resizing, compression and small color changes. Crops, rotations, overlays and added frames change them substantially. Use AI review when a member may customize the picture.

Review images with AI

review judges up to four images against your criteria and returns pass, fail or unclear with a short reason. Images are numbered in the order you pass them, so the criteria can refer to them:

import { decision, type EvaluationContext } from "@domino-sdk/relay/authoring"

// Call from evaluate() after checking that X is connected.
export async function framedAvatar(ctx: EvaluationContext<unknown, unknown>) {
  const result = await ctx.images.review({
    images: [{ x: "profile" }, { asset: "campaign-avatar" }],
    criteria:
      "Image 1 uses the frame and logo from image 2. The person's own photo may appear inside the frame.",
  })

  if (result.kind === "unclear") {
    return decision.review({ reason: result.reason })
  }

  return result.kind === "pass"
    ? decision.accept()
    : decision.reject({ reason: result.reason })
}

The AI reviewer receives re-encoded copies without EXIF or location data, never the image URL. It is told to ignore instructions inside the images, but AI can still misjudge adversarial pictures, so send unclear results to your team.

The reviewer judges what the picture shows, not whether it is genuine. To fail AI-generated or edited pictures, say so in the criteria, for example "It must be a genuine photograph: fail AI-generated or digitally edited images."

Read fields from a screenshot

extract reads up to 12 declared fields from one image. Each field is a string, number or boolean, and is null when the image does not show it clearly:

import { decision, type EvaluationContext } from "@domino-sdk/relay/authoring"

// For a quest with trigger: manual({ input: evidence.photo() }).
export async function joinedCommunity(
  ctx: EvaluationContext<unknown, { photo: string }>
) {
  const screenshot = await ctx.images.extract({
    image: { evidence: ctx.input.photo },
    fields: {
      community: {
        type: "string",
        description: "The X Community name shown on the page",
      },
      joined: {
        type: "boolean",
        description: "Whether the page shows the viewer as a member",
      },
    },
  })
  const { community, joined } = screenshot.values

  if (community === null || joined === null) {
    return decision.review({ reason: screenshot.reason })
  }

  return community === "Domino Builders" && joined
    ? decision.accept()
    : decision.reject({
        reason: "Upload a screenshot after joining the community.",
      })
}

A screenshot is a member's claim, not proof from X. Compare extracted values with data you can verify, such as the linked account's username, and send uncertain cases to staff.

Catch reused photos

A photo booth or a "share your setup" quest invites copying. seen records the image for this attempt and counts other members whose earlier images are within the distance:

import { decision, type EvaluationContext } from "@domino-sdk/relay/authoring"

// Call first in evaluate(); continue with your own checks when it returns null.
export async function reusedPhoto(
  ctx: EvaluationContext<unknown, { photo: string }>
) {
  const seen = await ctx.images.seen({ evidence: ctx.input.photo })

  return seen.matches > 0
    ? decision.review({
        reason: "This photo matches another member's submission.",
      })
    : null
}

The result contains matches, the closestDistance, and firstSeenAt in milliseconds. The default maxDistance is 8; pass { maxDistance } from 0 to 8 to change it, for example from a quest setting as the unique-photo recipe does. The same member's other attempts never count. Only images passed to seen are recorded, within the same project and environment. seen records the image when it runs, even if the attempt is later rejected, so two people submitting the same photo at once see each other.

Inspect an image

inspect returns width and height after EXIF rotation, format, bytes, sha256, and the 16-character phash and dhash. Use it to require a minimum size or to store hashes in your own records.

Photo galleries

A photo gallery collects the photos members send to one quest, such as a selfie wall at an event or entries to a photo contest. Your team browses them on the Photos page in Console, by day and by quest. Each photo opens its attempt.

A gallery holds the quest's accepted photos only. A photo that was rejected, is still waiting for its check or for review, or whose evidence was deleted is not in it.

  1. Add gallery to a quest whose members upload a photo. For a selfie wall, accept every photo:

    import {
      defineQuest,
      settings,
      manual,
      evidence,
      once,
      decision,
    } from "@domino-sdk/relay/authoring"
    
    export default defineQuest({
      key: "booth-selfie",
      title: "Take a selfie at our booth",
      settings: settings.object({}),
      trigger: manual({ input: evidence.photo() }),
      completion: once(),
      gallery: { kind: "wall" },
      rewards: [],
      async evaluate() {
        return decision.accept()
      },
    })

    For a contest, use { kind: "contest" } and check entries before they count, for example with AI review, sending unclear ones to your team:

    import {
      defineQuest,
      settings,
      manual,
      evidence,
      once,
      decision,
    } from "@domino-sdk/relay/authoring"
    
    export default defineQuest({
      key: "best-shot",
      title: "Best shot of the day",
      settings: settings.object({}),
      trigger: manual({ input: evidence.photo() }),
      completion: once(),
      gallery: { kind: "contest" },
      rewards: [],
      async evaluate(ctx) {
        const result = await ctx.images.review({
          images: [{ evidence: ctx.input.photo }],
          criteria:
            "A genuine photograph taken at a conference venue, with no offensive content.",
        })
    
        if (result.kind === "unclear") {
          return decision.review({ reason: result.reason })
        }
    
        return result.kind === "pass"
          ? decision.accept()
          : decision.reject({ reason: result.reason })
      },
    })

    Both kinds collect photos the same way. A contest also has winners, which your team picks in Console; a wall has none.

  2. Deploy, then promote to live. The gallery is part of the quest's definition, so it reaches live with a promotion like the rest of the quest.

  3. Open Photos in Console, choose the gallery, and filter by day or quest. Each tile shows the member's display name, or their member ID when they have none, and when they sent the photo.

Hide a photo

To keep a photo out of what you show, such as one with a stranger in it or one that is off-topic, hide it:

  1. On the photo's tile, select Hide.
  2. Write why, for example "Shows a stranger", and select Hide photo.

The tile dims and shows Hidden with your reason. Select Unhide on it, with a reason, to show the photo again. Use Show to see all photos, visible ones only, or hidden ones only. The gallery list counts visible and hidden photos separately. A contest winner has no Hide: unmark it first.

Hiding only changes how the gallery presents the photo. The member's attempt, completion and rewards stay as they are; to take a reward back, revoke the completion. Each hide and unhide is recorded with who did it and the reason in Audit history under Reviews, and in the attempt's timeline. Hiding needs the same review permission as browsing photos.

Pick contest winners

In a contest gallery, your team marks the winning photos, as many as you like, and can pay each winner a prize. The prize is a quest your staff confirm, so its rewards, budgets and webhooks work as for any staff confirmation.

  1. Add a prize quest that staff confirm, with the reward the winner gets, and deploy it with the contest:

    import {
      defineLedger,
      defineQuest,
      settings,
      manual,
      once,
      points,
      decision,
    } from "@domino-sdk/relay/authoring"
    
    const prizePoints = defineLedger({ key: "points", name: "Points" })
    
    export default defineQuest({
      key: "contest-prize",
      title: "Photo contest prize",
      settings: settings.object({}),
      trigger: manual({ actor: "staff" }),
      completion: once(),
      rewards: [points(prizePoints, 500)],
      async evaluate() {
        return decision.accept()
      },
    })

    With once(), a member wins the prize once. Use a second prize quest for another place, such as a runner-up.

  2. In Photos, open the contest and select Mark winner on a photo.

  3. Under Reward, choose the prize quest, or leave No reward, and select Mark winner.

The tile shows Winner and the prize it paid; the prize opens the confirmation's attempt. Use Show › Winners to see only the winners. Unmark takes the mark back but leaves the prize: to take it back, revoke the completion.

Domino pays a photo's prize once. Marking the same photo again, even after unmarking it, confirms nothing new. When the prize can't be confirmed, nothing is marked and Console says why: the member is banned, already won that prize or is still waiting for an earlier one, or the quest is paused or closed. The prize quest's budget and its own check run after the mark is saved, on the prize's attempt: if they reject it, the photo stays a winner without a paid prize, and marking it again replays that rejection, so confirm the quest for the member by hand instead. To add a prize to a winner marked without one, unmark it and mark it again with the prize. A hidden photo can't be marked, and a winner can't be hidden, so unhide or unmark first. Each mark and unmark is recorded in Audit history under Reviews, with the prize, and in the photo's timeline. Marking needs review permission, like hiding; choosing a prize also needs confirm permission, as confirming a staff quest does.

Export photos

Download a gallery's photos to share them, such as a day's selfies for your social team.

  1. In Photos, open the gallery, or all galleries, and choose a Day if you want one day only.
  2. Use Show to decide about hidden photos: All photos and Hidden only include them, Visible only and Winners leave them out.
  3. Select Export, then Export again in the dialog.

Your browser saves photos-1.zip, then photos-2.zip and so on when there are more. Each zip holds up to 1,000 photos, oldest first, in a folder per day and quest. A manifest.csv in each zip lists every photo with the member, their display name, when they sent it, the quest and whether it won, and whether it is hidden when hidden photos are included. It opens in any spreadsheet; a name that starts like a formula, such as =, gets a leading ' so it stays text. A photo Domino can't copy without its camera data, such as one over 25 megapixels, isn't in the zip: a skipped.csv beside the manifest names it, so you can download it from its attempt.

Each photo is a full-size copy without the location and camera data the original file can carry. A zip stops at 1,000 photos or 2 GiB of photos, so every unzip tool can open it and one download takes minutes. If a download breaks off, the zips saved before it are complete: select Continue from zip in the dialog to carry on from the one that broke.

Exported files leave Domino. Deleting a photo's evidence, the retention period and erasing a member don't reach copies already downloaded, so keep the zips only as long as you need them. Each zip is recorded in Audit history under Reviews, with the filters and the photos it held. Exporting needs review permission, as browsing photos does.

The grid shows small copies, at most 512 pixels on their longest side, without the location and camera data the original file can carry. The day is the day in your project calendar when the member sent the photo, not when it was reviewed.

Gallery photos are evidence, so they follow your project's evidence retention. A photo leaves the gallery when its evidence is deleted, whether by your team (delete an attempt's evidence), by the retention period, or when the member is erased. A hidden photo's hiding and a winner's mark are deleted with it, and a prize the mark paid stays; the hide and unhide records in Audit history keep their reason until the member is erased. Test and live keep separate galleries.

The CLI has domino galleries list, domino galleries photos [--quest QUEST] [--day YYYY-MM-DD] [--hidden include|exclude|only] [--winners] [--limit N] [--cursor CURSOR], domino galleries hide ATTEMPT --reason TEXT, domino galleries unhide ATTEMPT --reason TEXT, domino galleries winner ATTEMPT [--reward-quest QUEST], domino galleries unwinner ATTEMPT and domino galleries export --out DIR [--quest QUEST] [--day YYYY-MM-DD] [--include-hidden] [--force], all with --json. export writes every part as photos-1.zip, photos-2.zip, … into DIR, refuses to overwrite its first zip without --force, keeps no zip of a part whose download broke off and prints the command that continues from it (--cursor CURSOR --part N), and prints the parts with the photos each holds.

Limits and failures

LimitValue
Images per review4
Fields per extract12
Criteria2,000 characters
Downloaded or uploaded image5 MiB and 25 megapixels
Photo uploads by a member30 an hour; past it, uploads answer 429 rate-limited
Reference imagesJPEG, PNG or WebP; 5 MiB each; 10 per deployment
Capability callsEach method call uses one of the evaluation's eight calls

An AI review usually answers in about 2 seconds, and a screenshot read in 3 to 5. When the AI service has not answered after 5 seconds, Domino asks it again and takes the first answer. After 12 seconds the check fails as a technical failure and Domino retries the evaluation. The member's upload comes on top of that, so write the waiting screen for about 5 seconds for a review and 10 for a screenshot read; a retried check takes about 20.

Member avatar uploads are decoded by the same image service with the same 5 MiB and 25 megapixel limits, then stored as 512×512 WebP. They are profile pictures, not quest evidence; see member profiles.

A technical failure, such as an image service outage, never passes or rejects a member; when the quest code lets the error through, Domino retries it. To check a changed picture or account, the member starts a new submission.

The recipes above are complete quests built from these methods. Each one is also an SDK example in packages/sdk/examples.

Retire an image

Archive an image in Settings → Resources, or run domino images archive <key> --reason <text> in test. Fresh evaluator reads of that image name fail while it is archived. Stored bytes and image evidence already captured by an attempt remain available for replay. Publishing the image again preserves archive state. Unarchive it explicitly before new checks should capture it again.

On this page