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.
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 withnpx 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
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
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:
storybookShots: follow the Storybook quickstart (Storybook 9 or later, with the Vitest addon). On Storybook 8, use the Test Runner quickstart; on older versions, the legacy quickstart. Every story is captured, as with Lost Pixel.pageShots: follow the Playwright quickstart, then turn yourpageslist into tests as shown in Capture screenshots from URLs.ladleShotsorhistoireShots: follow the Playwright quickstart and add the test from Ladle and Histoire.customShots: keep capturing screenshots as you do today, and upload the folder you passed ascurrentShotsPathwith the Argos CLI.
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.
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.
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.
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
Frequently asked questions
Next steps
Storybook quickstart — replaces
storybookShots.Capture screenshots from URLs — replaces
pageShots.Stabilize screenshots — keep your new suite free of flaky diffs.
Lost Pixel alternatives in 2026 — where Lost Pixel users can migrate, on the Argos blog.
Last updated
Was this helpful?