ScreenshotNeo

BlogComparisons

Loki Screenshot Testing with Chromatic: Differences and Trade-offs

Compare Loki’s local Storybook screenshot workflow with Chromatic’s hosted visual testing to choose based on baselines, CI, platform needs, compatibility, and cost.

By the ScreenshotNeo team4 October 20268 min read

Short answer: Loki and Chromatic both compare rendered Storybook UI with screenshot baselines. Loki’s documented workflow centers on generating reference images in your project, reviewing differences, and explicitly approving baseline updates. Chromatic is a cloud visual-testing service with Storybook integration, hosted review, and CI checks. Choose based on where you want snapshots and test execution to live, how your team reviews and updates baselines, platform targets, compatibility, data handling, and current cost—not on unsupported claims that one is universally more accurate or faster.

This is a workflow comparison, not a benchmark. The official documentation describes the capabilities below; it does not establish head-to-head speed, accuracy, false-positive rates, or maintenance savings. Verify current package compatibility and Chromatic pricing before adopting either tool.

1. What Loki and Chromatic do

Loki: visual regression in your project workflow

Loki describes itself as visual regression testing for Storybook. Its documented workflow installs Loki, starts Storybook, creates reference images, runs comparisons, and lets the team inspect current and difference images before approving intended changes. Reference images are stored in a local loki folder and can optionally be kept with Git LFS. See the Loki getting-started guide and command documentation.

Chromatic: hosted visual testing and review

Chromatic is Storybook’s cloud visual-testing service. Its documentation describes capturing pixel snapshots of stories, comparing them to baselines, and reviewing changes in its hosted workflow. The Storybook addon and CI integrations can surface visual-test status on pull or merge requests. Chromatic says it automatically parallelizes runs; that is a vendor-described capability, not an independent performance measurement. See Storybook visual testing documentation and Chromatic features.

Both are visual checks: they test rendered appearance against an image baseline. They do not replace interaction, accessibility, unit, or integration tests. Storybook distinguishes visual tests from markup snapshot tests because pixel comparisons check what is rendered, while other test types answer different questions.

2. The practical differences

Decision area Loki, as documented Chromatic, as documented
Where baselines live Reference images are generated and kept in the project workflow, in a local loki folder; Git LFS is an option. Snapshots and review live in Chromatic’s hosted workflow; commits create comparisons against baselines.
How changes are reviewed Run the Storybook server and Loki commands, inspect current and difference images, then approve intended baseline updates. Use the hosted review workflow and CI integration to inspect visual changes and their status in the team’s pull/merge request process.
Execution and operations Your team owns the test runtime, image storage, CI setup, and reference-image lifecycle. Chromatic provides a managed cloud workflow and says runs are automatically parallelized. Evaluate its current data handling and operating fit.
Platform targets Project materials list Chrome in Docker or local Chrome, plus iOS simulator and Android emulator. An integration listing also names Chrome in AWS Lambda. Verify support for the exact Loki release and environment you plan to use. The reviewed material emphasizes browser-rendered stories in a cloud workflow. It does not establish a comparable device or emulator matrix.
Compatibility The getting-started guide, last updated August 27, 2024, lists Node 16+ and optional dependencies. Confirm requirements for the package version you install. Storybook 8 visual-testing documentation describes the addon route for Storybook 7.6+ and token setup for CI. Check the current integration instructions for your Storybook version.
Cost Runtime and storage costs depend on the infrastructure and image-retention choices your team makes. The reviewed Loki sources do not give a universal total cost. Check Chromatic’s current plans, limits, and billing for your usage. The reviewed sources do not establish an authoritative current price or allowance.

The listed versions and targets come from documentation and can change. Loki’s dated guide and the described Chromatic integration are starting points for verification, not a guarantee of current compatibility.

3. Choosing between them

Choose Loki when local ownership fits your workflow

  • You want reference images in the project workflow and want to manage their lifecycle yourself.
  • You need control over where tests execute or where image artifacts are stored.
  • A documented simulator target appears relevant to your use case, and you verify it works in your exact Loki release and environment.
  • Your team is prepared to maintain the browser runtime, CI commands, image storage, and baseline update process.

Choose Chromatic when hosted review fits your workflow

  • You want hosted visual review integrated with Storybook and CI status checks.
  • Your reviewers benefit from reviewing changes through the service’s workflow.
  • The current integration supports your Storybook version and meets your data-handling requirements.
  • You have checked the current plan limits and cost against your expected usage.

These recommendations follow the documented workflows; they are not results of a controlled comparison. If neither workflow fits, write down where screenshots may be stored, which environments must render them, who may approve baseline changes, and how CI should report a failure. Those requirements make the choice concrete.

4. A decision checklist before adopting either tool

  1. Pin the versions. Record your Storybook version, Node version, and the exact Loki or Chromatic integration version you intend to use.
  2. Verify target support. Test the browser and any Docker, simulator, emulator, or CI environment your team actually needs. Do not infer support for a target from a project listing alone.
  3. Agree on baseline ownership. Decide who reviews differences, who can approve updates, and how intentional visual changes are recorded.
  4. Check artifact location and retention. Determine where baseline and run images are stored, who can access them, and whether the approach meets your repository and data policies.
  5. Estimate the operating cost. For Loki, include CI/runtime and image storage. For Chromatic, check its current pricing and usage limits. Do not rely on stale third-party price summaries.
  6. Try representative stories. Include a stable component, a dynamic component, and a story with fonts or remote assets. Observe how your chosen workflow handles those cases before relying on it broadly.
  7. Keep other tests. Pair visual checks with interaction and accessibility checks appropriate to the product. A matching screenshot does not prove behavior is correct.

5. Common problems and troubleshooting

Symptom Likely cause What to check
Loki cannot connect to Storybook or produces no references Storybook was not started, its address or port differs from the configuration, or the runtime is not ready when capture begins. Follow the current Loki getting-started commands, confirm Storybook is reachable from the Loki process, and check the configured host and port.
Many unexpected image differences The rendered page changed because of fonts, timing, animation, dynamic content, browser differences, or environment-specific assets. Compare the current and reference images, stabilize story data and rendering conditions, and use the same supported browser/runtime in baseline and CI runs.
Baseline updates are hard to review Generated images changed without a clear approval process or were stored in an inconvenient way. Agree on explicit review and update ownership. If using Loki, inspect the current and difference images and decide whether Git LFS fits your repository workflow.
Chromatic CI does not authenticate The CI token or project configuration is missing or unavailable to the job. Follow the current Storybook/Chromatic CI setup and token instructions; check that the secret is present in the intended CI environment without exposing it in logs.
Addon setup fails or the integration is incompatible The Storybook, Node, package, or integration versions do not match the instructions being followed. Check current official compatibility guidance for the exact versions in the project. The researched Loki guide is dated August 27, 2024; the documented Chromatic route has version prerequisites.
A visual test passes while a behavior is broken A screenshot comparison only covers rendered appearance for the captured state. Add or retain interaction, accessibility, and other functional tests for behavior a static image cannot establish.

These are troubleshooting checks inferred from the documented workflows, not claims that either tool has a particular defect rate.

6. Performance, reliability, and cost considerations

Performance

The reviewed sources do not provide comparable timing data. Chromatic says its runs are automatically parallelized, but that vendor statement does not establish how quickly your project will finish. Loki’s runtime depends on the environment and setup your team operates. Measure a representative Storybook in your own CI if completion time affects your pipeline.

Reliability

For Loki, reliability depends in part on the consistency and availability of the browser runtime, Storybook server, CI environment, and reference-image storage that your team manages. For Chromatic, assess the service and integration against your team’s availability and data requirements; the sources reviewed here do not establish an uptime figure. For either tool, use repeatable story data and make baseline approvals reviewable.

Cost

Loki’s use of a project-managed workflow does not make it cost-free: account for CI compute, runtime maintenance, and baseline storage. Chromatic has service pricing and usage limits that should be checked directly before selection; this research did not confirm current prices or allowances. Compare total cost for your own expected run volume, retention, and team review process.

7. FAQ

Are Loki and Chromatic alternatives to unit tests?

No. They compare rendered appearance to a visual baseline. Keep unit, interaction, accessibility, and integration coverage for the behaviors those tests address.

Can Loki store reference images with Git LFS?

Loki’s project documentation describes Git LFS as an optional way to store reference images. Confirm the current setup instructions and repository policy.

Does Chromatic support mobile emulators in the same way Loki does?

The reviewed Chromatic material does not establish an equivalent device or emulator matrix. Verify the exact target support you need with current documentation.

Which one is faster?

The reviewed sources do not establish a head-to-head result. Chromatic describes automatic parallelization; measure your own CI workflow before making a speed decision.

8. ScreenshotNeo as an alternative for capturing pages

If the task is capturing arbitrary web pages rather than comparing Storybook component baselines, ScreenshotNeo is a website screenshot API and MCP server. It is not a replacement for Loki or Chromatic’s visual-baseline review workflow. It can be an alternative to try first for screenshot capture: cookie and consent banners, newsletter popups, and chat widgets are removed before the shot; bot checks, blank pages, failed loads, and cache hits are not billed; an MCP server lets AI agents take screenshots; and 1,000 screenshots per month are free with no card, with paid plans starting at $5 for 3,000.

One-call capture

See the ScreenshotNeo API documentation. Replace the target URL with the page you need to capture and provide your API key:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
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)
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);

ScreenshotNeo also offers full-page and selector capture, device and viewport settings, PDF output, waits, request blocking, custom headers and cookies, caching, signed links, async jobs, and bulk capture. Its response headers identify the page verdict and billing status. See the docs for parameters and response details. Sign up for 1,000 free screenshots each month with no card.