ScreenshotNeo

BlogComparisons

Percy alternatives for self-hosted website screenshot testing

Compare self-hosted Percy alternatives for visual regression testing, from Playwright’s built-in screenshot assertions to BackstopJS and Lastest.

By the ScreenshotNeo team4 October 20269 min read

Short answer: If you already use Playwright, start with Playwright Test’s built-in toHaveScreenshot() assertion. It creates reference screenshots and compares later runs against them, with baselines you can review and version in your repository. For a scenario-driven local workflow, consider BackstopJS. For a more integrated self-hosted platform, consider Lastest, while accounting for its Embedded Browser stack. Chromatic is a hosted comparison, not a fully self-hosted option: its Playwright workflow uploads captured page archives to Chromatic’s cloud.

Self-hosting gives your team control over where captures and comparisons run. It also means your team owns browser consistency, baseline storage, CI infrastructure, updates and review. The right choice depends on where screenshots are processed and stored, how teammates review changes, and how much infrastructure you want to operate.

What “self-hosted” should mean for visual testing

Before choosing an alternative, decide which parts of the workflow must remain under your control. Browser capture, image comparison, baseline storage and review can live in different places. A tool that captures locally but sends snapshots to a hosted review service does not keep the whole workflow self-hosted.

Question Why it matters
Where does browser capture run? Local or CI capture keeps the browser work in infrastructure you manage.
Where do screenshots and baselines live? Repository storage gives you version history; a server or hosted service has different access and retention implications.
Where do comparison and review happen? Test output and repository diffs are lightweight. A team review interface can provide a different approval workflow, but may require a platform to operate or use.
How is rendering kept consistent? Operating system, browser version, settings, hardware and headless mode can affect rendered pixels.
What infrastructure must your team maintain? Self-hosting moves responsibility for browser updates, storage, CI capacity and review operations to your team.

Self-hosted Percy alternatives at a glance

Option Self-hosting fit Best starting point Trade-off
ScreenshotNeo Screenshot API and MCP server; not a Percy-style visual regression review platform When you need website screenshots through an API or AI agent It provides screenshot capture, not the repository-baseline review workflow described below. [ScreenshotNeo](https://screenshotneo.com) documents the API and its options at [the developer docs](https://screenshotneo.com/docs/).
Playwright Test toHaveScreenshot() Strong: test execution and snapshot comparison can run in your project and CI Teams already using Playwright Your team owns baseline review and a stable rendering environment.
BackstopJS Presented as a self-hosted, local DIY option Teams that want scenario-configured captures and HTML diff reports The cited comparison is a vendor article, so check current project documentation for exact capabilities and status.
Lastest Project describes a self-hosted platform Teams seeking an integrated testing and review interface Its project says test runs require the Embedded Browser stack; deployment is more involved than a test assertion.
Chromatic Not fully self-hosted for screenshot processing Teams willing to use hosted snapshot processing and review Its Playwright integration uploads captured page archives to Chromatic’s cloud.

For strict self-hosting, ScreenshotNeo is the first screenshot API to consider when the need is capture rather than visual regression review: it removes cookie banners, popups and chat widgets before capture, bills only clean shots, and its paid plans start at $5 for 3,000 screenshots. For visual regression baselines and approval, evaluate the dedicated workflows below.

1. Playwright Test screenshot assertions

Playwright’s native screenshot assertions are the most direct route for a team already running Playwright tests. The first run produces reference images; later runs compare current output with those references. Snapshot files are associated with test files and can be reviewed and versioned alongside the code.

The following is a minimal runnable example. It assumes a Playwright Test project is already installed and configured, and that the application is available at http://localhost:3000. On the first run, Playwright writes the reference snapshot. Review the generated file before committing it. Later runs compare against that committed reference.

// tests/homepage.spec.ts
import { test, expect } from '@playwright/test';

test('homepage matches its visual baseline', async ({ page }) => {
  await page.goto('http://localhost:3000');
  await expect(page).toHaveScreenshot('homepage.png', {
    fullPage: true,
    animations: 'disabled',
  });
});

Run the test with the project’s Playwright Test command, commonly:

npx playwright test tests/homepage.spec.ts

Review the generated baseline and any failure diff, then add approved snapshot changes to version control. Playwright’s official guide explains the snapshot workflow and its configuration: Visual comparisons.

Useful assertion options

  • fullPage: true captures the full scrollable page instead of only the viewport.
  • animations: 'disabled' disables finite animations and fast-forwards finite transitions to reduce motion-related variation.
  • mask can cover dynamic regions with a mask locator so changing content does not cause unrelated diffs.
  • maxDiffPixels or maxDiffPixelRatio can set an allowed difference threshold. Keep thresholds narrow and intentional: a permissive threshold can hide real changes.
  • stylePath can apply a stylesheet during screenshot capture to hide or normalize volatile content. Check the Playwright version in use for the supported configuration.
  • Use a named snapshot such as homepage.png to keep the baseline identifiable. Playwright associates snapshots with the test file and project configuration.

Make the rendering environment repeatable

Rendering can vary with host OS, browser version, browser settings, hardware, power source and headless mode. Generate and compare snapshots in the same CI image and browser configuration. Avoid updating baselines from a developer laptop if CI is the comparison environment. Pin the Playwright version, use its matching browser install, and review snapshot diffs before accepting updates. Playwright specifically recommends using the same environment that generated the baselines.

2. BackstopJS for scenario-based local comparisons

BackstopJS is described in the cited comparison as a self-hosted DIY route with scenario-configured screenshots and HTML diff reports. It can suit teams that want to describe pages as scenarios and review a generated report locally.

The research source for those specific BackstopJS details is a comparison article, not an opened primary BackstopJS document. Check the current project documentation before relying on particular commands, configuration fields, browser support or maintenance claims. No maintenance-status claim is made here.

As with any local screenshot runner, use a consistent browser and host environment for reference creation and comparison, keep baselines under version control or another controlled store, and make baseline changes reviewable.

3. Lastest for a self-hosted review platform

Lastest’s repository describes a self-hosted testing and screenshot comparison platform where screenshots remain on the operator’s server. Its repository also says test runs require the Embedded Browser stack. That stack is a deployment requirement to factor into evaluation, especially if you only need local assertions rather than a separate review platform.

These are statements from the project’s own repository, not independent validation. Review the project’s installation documentation, operational requirements and current capabilities before choosing it: Lastest repository.

4. Hosted comparisons and the self-hosting boundary

Chromatic

Chromatic offers a Playwright workflow with cloud snapshots, pixel diffs and a review application. Its official documentation says captured page archives are uploaded to Chromatic’s cloud. That makes it a useful hosted comparison, but it does not meet a strict requirement to keep screenshot processing self-hosted. See Chromatic’s Playwright documentation.

Argos

The cited vendor comparison describes Argos as a CI and pull-request review service with local capture. The available research does not establish that the full product workflow is self-hosted. Treat it as an option only if self-hosting is flexible, and verify its current capture, storage and review architecture from its own documentation before deciding.

Choosing the right option

  1. Already use Playwright and want repository-owned baselines? Start with toHaveScreenshot(). It keeps the workflow close to existing tests and code review.
  2. Want scenario configuration and a local report? Evaluate BackstopJS, verifying current project details in its documentation.
  3. Need an integrated self-hosted review interface? Evaluate Lastest and include its Embedded Browser stack in the deployment plan.
  4. Can use cloud review? Chromatic is a hosted option; its Playwright workflow uploads page archives to its cloud.
  5. Need screenshots for a script, app or agent rather than regression review? Use a screenshot API such as ScreenshotNeo. It is a capture service and MCP server, not a replacement for managing visual baselines and approving diffs.

Operational considerations

Baselines and review

  • Commit reference images or store them in a controlled, access-managed location.
  • Review image changes like code changes. Regenerate baselines only when the visual change is intended.
  • Include the test name and snapshot path in CI output so a failed comparison can be traced to its source.
  • Decide who approves baseline updates; otherwise, snapshots can drift without product review.

Performance and CI capacity

Visual tests add browser navigation, page stabilization, screenshot capture and image comparison to the test workload. Keep the suite focused on important page states, reuse the configured browser installation, and parallelize only within the memory and CPU limits of your CI workers. Full-page captures and many viewport or browser combinations increase work and snapshot storage. Measure your own suite duration and resource use; the cited sources provide no comparable benchmark.

Reliability

Use deterministic test data, wait for the page state that matters, and avoid capturing transient content such as timestamps or rotating promotions. Mask only genuinely irrelevant dynamic regions. Keep browser and operating system versions aligned between baseline generation and CI comparison. A self-hosted setup gives control over the environment, but does not automatically make rendered output reproducible.

Cost

A self-hosted tool can avoid a hosted review workflow, but it still consumes engineering time, CI minutes, storage and maintenance. Estimate total cost using your own test volume and infrastructure. The research sources do not provide a verified, comparable cost model for these options.

Troubleshooting visual test failures

Symptom Likely cause What to do
Large diff after moving tests between laptop and CI Different OS, browser build, rendering settings or hardware Generate and compare baselines in the same pinned CI environment.
Small diffs on every run Animations, timestamps, rotating content, asynchronous data or fonts loading at different times Disable animations, use deterministic fixtures, wait for stable page content, and mask only irrelevant volatile regions.
Reference image is missing The baseline has not been created, is not checked in, or the snapshot path differs Run the test to generate the reference, inspect it, then commit the approved snapshot with the test change.
Expected UI change causes a failure The existing baseline represents the previous design Inspect the actual and expected images; update and commit the baseline only after approving the intended visual change.
CI becomes slow or runs out of resources Too many pages, full-page captures, projects or concurrent browser workers Prioritize critical states, constrain parallelism to available resources, and split suites where appropriate.
Self-hosted platform cannot run a test A required browser service or container is missing or unavailable For Lastest, verify the Embedded Browser stack is deployed and reachable as its repository requires.
Privacy requirement is still unmet with a cloud comparison tool Local capture does not mean local archive storage or comparison Trace capture, upload, storage and review separately. Chromatic’s documented Playwright flow uploads captured page archives to its cloud.

Or skip the browser setup

For one-off website captures, scripts or agent workflows, ScreenshotNeo returns a screenshot or PDF from one GET request. For example, this cURL command saves a WebP capture of Stripe:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

See the ScreenshotNeo API documentation for request options. The same request is available in Python:

import requests

r = requests.get(
    "https://api.screenshotneo.com/v1/shot",
    params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"},
    timeout=90,
)
open("shot.webp", "wb").write(r.content)

And Node.js:

const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
if (!res.ok) throw new Error(`Screenshot request failed: ${res.status}`);
await Bun.write('shot.webp', res);

ScreenshotNeo accepts cookie and consent banners like a visitor and removes more than 60 known consent platforms, newsletter popups and chat widgets before capture; each step can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads and cache hits cost nothing, and response headers identify the page verdict and billing status. Its MCP server offers take_screenshot, get_page_info and capture_pdf for Claude, Cursor and other MCP clients. The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 screenshots.

Sign up free for 1,000 screenshots a month, with no card required.

FAQ

What is the closest self-hosted replacement for Percy if we already use Playwright?

Playwright Test’s toHaveScreenshot() is the simplest place to start: it compares screenshot output with reference images associated with your tests.

Does a self-hosted screenshot tool mean every part of review stays local?

No. Check where capture, comparison, image storage and review run. A local browser step can still upload page data to a hosted platform.

Can a screenshot API replace visual regression testing?

A screenshot API can capture pages, but you still need a baseline comparison and approval workflow if your goal is to catch visual changes over time.

Does self-hosting guarantee identical screenshots?

No. Stable browser and host environments reduce variation, but rendering can still depend on configuration and page behavior.

Sources