Loki
loki.js.org
What it is
Loki is a free, MIT-licensed tool for checking Storybook projects for visual regressions. It captures story screenshots and compares them with reference images, producing visual differences for review. The workflow is to create reference screenshots, run comparisons, review the differences, and approve updated references. Loki is designed for continuous integration, where tests can fail if reference images are missing. Capture targets include Chrome in Docker or locally, Chrome in AWS Lambda, the iOS simulator, and the Android emulator; an AWS Lambda renderer is available for large test suites. Node 16 or later is required. Recent Storybook versions need no extra integration for non-React Native projects, while React Native setup uses an import in `storybook/storybook.js`. Projects can configure Loki in a `package.json` section or supported Loki configuration files. Loki does not start Storybook or simulator and emulator servers, so they need to be running before tests. Documented animation limitations include looping requestAnimationFrame animations, GIFs, SVG animations, native Lottie animations, and React Native Animated.
Spec sheet
- Purpose
- Loki tests Storybook projects for visual regressions by comparing screenshots with reference images.Read 5 Oct 2026 · loki.js.org
- Security
- The command-line reference documents a `chromeDockerWithoutSeccomp` option, which defaults to false.Read 5 Oct 2026 · loki.js.org
- Support
- The project provides documentation and a GitHub repository for its community and development.Read 5 Oct 2026 · loki.js.org
- License
- The project repository identifies Loki as MIT licensed.Read 4 Oct 2026 · github.com
- Animation limits
- Documented known animation limitations include looping requestAnimationFrame animations, GIFs, SVG animations, native Lottie animations, and React Native Animated.Read 4 Oct 2026 · loki.js.org
- AWS Lambda
- A remote renderer using AWS Lambda is available for large test suites.Read 4 Oct 2026 · loki.js.org
- Browser targets
- Supported browser targets include Chrome in Docker, local Chrome, and Chrome in AWS Lambda.Read 5 Oct 2026 · github.com
- CI
- Loki is designed to run on continuous integration servers, where tests can require reference images.Read 4 Oct 2026 · loki.js.org
- Continuous integration
- Loki is designed to run on continuous integration servers and can fail tests when reference images are missing.Read 5 Oct 2026 · loki.js.org
- Custom configuration
- Projects can configure Loki through a `loki` section in `package.json` or through `.lokirc`, `.lokirc.json`, or `loki.config.js`.Read 5 Oct 2026 · loki.js.org
- Image comparison
- Loki documents pixelmatch, GraphicsMagick, and looks-same as image comparison engines.Read 5 Oct 2026 · loki.js.org
- License and maintainer
- The repository identifies Loki as MIT-licensed and lists Joel Arvidsson as author and Tomas Echeverri Valencia as maintainer.Read 5 Oct 2026 · github.com
- Maintainer
- The repository lists Joel Arvidsson as author and Tomas Echeverri Valencia as maintainer.Read 4 Oct 2026 · github.com
- Mobile targets
- Loki supports screenshots from the iOS simulator and Android emulator.Read 5 Oct 2026 · loki.js.org
- Optional dependencies
- GraphicsMagick is optional for the `gm` diffing engine, and Docker is optional for the `chrome.docker` target.Read 5 Oct 2026 · loki.js.org
- Prerequisite
- The getting-started guide lists Node 16 or newer as a prerequisite.Read 5 Oct 2026 · loki.js.org
- React Native integration
- React Native projects can integrate Loki by importing `loki/configure-react-native` in `storybook/storybook.js`.Read 5 Oct 2026 · loki.js.org
- Reference images
- Loki compares screenshots of stories with reference images and creates visual diffs for review.Read 4 Oct 2026 · loki.js.org
- Storybook integration
- For recent Storybook versions, the documentation says no further integration is needed; older versions may require a React configuration import.Read 5 Oct 2026 · loki.js.org
- Storybook setup
- The getting started guide says recent Storybook versions need no extra integration for non React Native projects; React Native setup imports loki/configure-react-native.Read 4 Oct 2026 · loki.js.org
- Targets
- Supported targets include Chrome in Docker, local Chrome, the iOS simulator, and the Android emulator.Read 4 Oct 2026 · loki.js.org
- Test workflow
- The workflow creates reference screenshots, tests stories against them, reviews visual differences, and approves updated references.Read 5 Oct 2026 · loki.js.org
- Workflow limitation
- Loki does not start Storybook or simulator/emulator servers, so these must be running before tests.Read 4 Oct 2026 · github.com
Plans and prices
Strong points and limits
Strong points
- MIT-licensed and free.
- Compares Storybook screenshots with reference images.
- Supports Chrome, iOS simulator, and Android emulator targets.
- Can approve updated references in a review workflow.
- Designed for continuous integration.
Limits
- Requires Node 16 or later.
- Does not start Storybook or simulator and emulator servers.
- Documented animation types have known limitations.
- Cross-browser capture is not supported.
Who it suits
Loki suits teams using Storybook who want screenshot comparisons in a continuous integration workflow. It also supports screenshots from iOS simulators and Android emulators.
Loki in depth
Read the full write-up
Loki is an open-source visual regression tool for teams building Storybook projects. It suits teams that want to review screenshot changes in CI and can manage their own browser and simulator setup. Its focused workflow costs nothing, but puts that setup and baseline upkeep on the team.
Overview
Loki captures Storybook stories and compares them with reference images, producing visual differences for review. Teams can approve updated references as interfaces change; in CI, a missing reference image can fail a test. That makes baseline creation an explicit part of the workflow, rather than letting an unreviewed screenshot become the new standard.
The trade-off is operational responsibility. Loki does not start Storybook or simulator and emulator servers, so those services must be running before tests begin. It is a better fit for teams with an established Storybook and CI setup than for those looking for a managed capture service.
Key features
Storybook capture and review
Recent Storybook versions need no additional integration for projects other than React Native. Older versions may require a React configuration import, while React Native projects use loki/configure-react-native in storybook/storybook.js. The workflow runs stories against saved screenshots, surfaces visual diffs, and lets teams approve replacement references. This is a useful review gate, but it still relies on a person to decide whether a difference is intentional.
Browser and mobile targets
Loki supports Chrome in Docker, local Chrome, the iOS simulator, and the Android emulator. Chrome on AWS Lambda offers remote rendering for large suites. Mobile coverage is tied to simulators and emulators, not a broad cross-browser matrix, so teams whose priority is comparing behavior across browsers should look elsewhere.
Configuration and comparison
Projects can configure Loki in the loki section of package.json, or with .lokirc, .lokirc.json, or loki.config.js. The documented diff engines are pixelmatch, gm, and looks-same; gm requires GraphicsMagick. Docker is optional and needed only for the chrome.docker target, giving teams a choice between a containerized Chrome target and local browser setup.
Animation constraints
Looping requestAnimationFrame animations, GIFs, SVG animations, native Lottie animations, and React Native Animated are documented limitations. Interfaces that rely heavily on these animations may produce captures that are difficult to use as stable regression checks.
Pricing
Loki's only plan is free: free. It is MIT-licensed open-source software, with no paid tier or free-trial period. The requirement is Node 16 or later; there are no per-seat or screenshot charges to weigh. Optional dependencies such as Docker and GraphicsMagick may still matter if a team chooses the targets or diff engine that need them.
Platforms
Loki's listed platforms are Android, iOS, Linux, macOS, self-hosted, web, and Windows. In practice, capture runs through Chrome, iOS Simulator, or Android Emulator targets, with CI use supported. Node 16 or later is a prerequisite, and teams must start Storybook and any simulator or emulator servers themselves.
Who it's for
Loki is aimed at teams with Storybook projects that want a no-cost visual regression step and can maintain reference screenshots in their development and CI workflow. Its simulator and emulator targets also suit teams checking mobile Storybook output. It is a weaker fit for teams that need cross-browser capture, managed server startup, or dependable screenshots of the documented animation types.
Pros and cons
Pro: The full tool is free and MIT-licensed, so teams can add screenshot comparison without a subscription or seat-based plan.
Pro: CI can fail when reference images are missing, making incomplete baselines visible in the test process.
Pro: Chrome, iOS Simulator, Android Emulator, and AWS Lambda targets cover browser and mobile workflows, including a remote option for large suites.
Con: Teams must start Storybook and simulator or emulator servers before running tests, adding setup responsibility to CI and local workflows.
Con: There is no cross-browser capture; the browser targets are Chrome-based.
Con: Several common animation approaches are documented limitations, which narrows the interfaces for which screenshot comparisons are dependable.
Alternatives
Visual Regression Testing Software is the broader category directory for comparing options.
Screenshotbot is worth considering for teams that prefer a paid service with a free plan and trial; its Pay-as-You-Go plan charges $0.01 a month, billed per screenshot, and includes 10,000 free screenshots/month, up to 5 users, and 3 months of history.
Happo may suit teams seeking visual and accessibility testing with a free allowance of 5,000 snapshots per month and Chrome support; its Starter plan is $149 a month.
Percy is an option for teams wanting a free screenshot allowance with unlimited users and projects: its Free plan includes 5,000 screenshots/month.
Roborazzi is another free, Apache-2.0-licensed option, particularly relevant to Android and iOS platform coverage.
Sauce Labs Cross-Browser Testing is the alternative to consider when cross-browser testing is the priority; its Live Testing plan is $39 a month, billed annually, or $49 month to month.
Visual Regression Tracker is another free option with self-hosted and web platform coverage.
SnapDiff is a freemium alternative with API and web platform coverage.
Argos is a freemium API and web alternative whose SDKs and platform are MIT-licensed and open source.
Verdict
Choose Loki if your team uses Storybook, wants reference-image checks in CI, and is prepared to run the required servers and maintain baselines. Its MIT license and free plan make it a strong fit for that focused workflow. Look elsewhere if you need cross-browser coverage, managed infrastructure, or stable comparisons for the documented animation types.
Verdict
Loki offers a defined reference-image workflow for visual regression checks, including CI use and mobile simulator targets. Teams must start the required servers themselves and account for documented animation limits.
Where Specifiction places it
- Visual Regression Testing Software#4 of 268.6
- Visual Testing#3 of 178.7