Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Migrate from Lost Pixel to Argos

Migrate visual testing from Lost Pixel to Argos. Map the Storybook, Ladle, Histoire, page, and custom shots of lostpixel.config.ts to the Argos Storybook SDK, Playwright, or argos upload.

To migrate from Lost Pixel to Argos, replace each shot mode of lostpixel.config.ts with its Argos equivalent: @argos-ci/storybook for storybookShots, a Playwright test with @argos-ci/playwright for pageShots, ladleShots, and histoireShots, and argos upload for customShots. Then delete the .lostpixel/ folder and the Lost Pixel GitHub Action. Argos picks baselines from your Git history and reports visual changes as a check on your pull request.

On April 22, 2026, the Lost Pixel team announced that it is joining Figma and sunsetting Lost Pixel, and the lost-pixel repository was archived. The announcement gives no shutdown date for the hosted Lost Pixel Platform.

How Lost Pixel and Argos differ

  • Lost Pixel is a separate runner: it opens your built Storybook, Ladle, or Histoire, or a list of pages, in its own browser and captures every shot. In open-source mode, baselines are images committed under .lostpixel/baseline/ and refreshed with npx lost-pixel docker update. In Platform mode, shots go to the Lost Pixel Platform for review.

  • Argos captures screenshots in the test runner you already use, such as the Storybook Vitest addon or Playwright, or uploads a folder of images you captured yourself. Baselines are selected from your Git history, and changes are approved or rejected on the pull request.

Concept mapping

Lost Pixel
Argos

storybookShots (storybookUrl)

@argos-ci/storybook — see the Storybook quickstart

pageShots (pages, baseUrl)

A Playwright test per page — see Capture screenshots from URLs

ladleShots / histoireShots

A Playwright test that visits each story — see Ladle and Histoire

customShots (currentShotsPath)

npm exec -- argos upload <folder> — see Any test framework

lostPixelProjectId + LOST_PIXEL_API_KEY

ARGOS_TOKEN

.lostpixel/baseline/ (open-source mode)

Baselines from Git history

npx lost-pixel docker update

Approve in the Argos review UI

failOnDifference

The Argos commit status on your pull request

breakpoints

The viewports option — see Responsive viewports

mask

data-visual-test helpers, or Playwright's mask screenshot option

threshold

The threshold option of argosScreenshot (a sensitivity between 0 and 1)

waitBeforeScreenshot / waitForSelector

Argos stabilization, plus Playwright waits before argosScreenshot

lost-pixel/lost-pixel GitHub Action

Your test command in CI, with ARGOS_TOKEN set

Migrate the project

1

Pick the Argos setup for each shot mode

Look at the shot modes enabled in your lostpixel.config.ts and set up the matching Argos integration:

2

Translate page shots into a Playwright test

Each entry of pageShots.pages becomes a page.goto followed by argosScreenshot:

Before (lostpixel.config.ts)

After (tests/pages.spec.ts)

Set baseURL and webServer in playwright.config.ts so page.goto(path) reaches your app, as in the Playwright quickstart. To keep your breakpoints, pass them as viewports.

3

Replace the CI step

Swap the Lost Pixel action for your test command, with ARGOS_TOKEN set:

Before (Lost Pixel)

After (Argos, Playwright)

For Storybook, use the workflow from the Storybook quickstart. For custom shots, run npm exec -- argos upload <folder> after your tests. ARGOS_TOKEN comes from Settings → Authentication → Project token; on GitHub Actions you can use OIDC or tokenless authentication instead of a secret.

4

Seed the baseline

Run the new workflow on your default branch first. That build becomes the baseline; until it exists, pull request builds are marked as orphan.

5

Remove Lost Pixel

Delete lostpixel.config.ts, the .lostpixel/ folder (baseline/, current/, difference/), the lost-pixel dependency, and the LOST_PIXEL_API_KEY secret.

Ladle and Histoire

Argos has no dedicated Ladle or Histoire SDK. A short Playwright test reproduces what Lost Pixel did: read the list of stories that Ladle or Histoire publishes, open each one, and capture it with argosScreenshot. Serve your Ladle or Histoire build first, for example from the webServer option of playwright.config.ts.

Migrating Lost Pixel options

Breakpoints (breakpoints)

Pass the widths to the viewports option of argosScreenshot, or add one Playwright project per viewport. See Responsive viewports. For Storybook, use story modes.

Masks (mask)

Add a data-visual-test helper to the element: data-visual-test="blackout" masks it (Storybook, Playwright, and Cypress SDKs), transparent hides it and keeps its space, and removed takes it out of the layout. In Playwright tests, you can also pass Playwright's mask option, which argosScreenshot forwards to the screenshot call.

Waits (waitBeforeScreenshot / waitForSelector)

argosScreenshot already waits for fonts, images, and aria-busy elements before capturing. For anything else, wait in your test before the screenshot, for example with await page.waitForSelector(...). See Wait for loading.

Threshold (threshold)

Lost Pixel's threshold is the share or number of pixels allowed to differ. Argos's threshold option is different: it sets the sensitivity of the diff algorithm, between 0 and 1, and defaults to 0.5. Start without it, and only raise it for a screenshot that needs it.

Story parameters (parameters.lostpixel)

Argos doesn't read parameters.lostpixel. Remove those parameters, and use story modes and the Argos helpers for the per-story settings you need.

Frequently asked questions

What happens to my Lost Pixel baselines?

They don't transfer. Lost Pixel and Argos capture screenshots differently, so Argos starts from its own baseline: the first build on your default branch. Delete .lostpixel/baseline/ once the migration is merged.

Is Argos open source, like Lost Pixel?

Yes. The whole platform, diff engine included, is MIT-licensed in the argos-ci/argos repository. Argos runs as a managed cloud service; self-hosting is not officially supported.

How do I approve changes without lost-pixel update?

Open the build in the Argos review UI and approve or reject the changes. The pull request check updates automatically, and there are no images to commit.

Is there a free plan?

Yes, the Hobby plan is free. See Argos pricing plans for what each plan includes.

Next steps

Last updated

Was this helpful?