FREEDOM251

Freedom251 › Visual Regression Testing Software

jest-image-snapshot

Free plan Self-hosted

Visit jest-image-snapshot Alternatives Pricing

jest-image-snapshot's own site

What jest-image-snapshot is

jest-image-snapshot is a free, open-source matcher for Jest that compares images in visual regression tests. It stores a baseline image on the first run, then checks later test images against it. You can compare images pixel by pixel with Pixelmatch or use structural similarity (SSIM), which the project describes as experimental. Settings let you adjust per-pixel sensitivity and set an overall failure threshold by pixel count or percentage. A configurable Gaussian blur can help handle noise when images are scaled to different resolutions.

For reviewing changes, the matcher can arrange image differences horizontally or vertically, and can print a base64 diff or an iTerm inline image in the console. A browser screenshot can be used as the image input in a visual test. Jest’s `--updateSnapshot` or `-u` option refreshes stored baselines. The package installs through npm and is self-hosted. Its listed peer dependencies are Jest versions 20 through 29. An example reporter uploads failed diff images to an AWS S3 bucket for ephemeral CI environments. TypeScript definitions are community maintained and are not officially supported by the maintainers.

Who it suits

jest-image-snapshot suits teams using Jest who want image comparisons as part of visual regression tests, including tests that use browser screenshots. It is a fit for self-hosted projects that can work within its listed Jest version range.

What it does well

  • Stores a baseline image on the first run.
  • Supports Pixelmatch and experimental SSIM comparisons.
  • Sets sensitivity and failure thresholds by pixels or percentage.
  • Creates horizontal or vertical diff layouts.
  • Can print diffs in the console.
  • Includes an example reporter for uploading failed diffs to AWS S3.

What to know first

  • Jest versions below 20 are unsupported.
  • SSIM comparison is described as experimental.
  • TypeScript definitions are community maintained and unofficial.
  • Cross-browser capture is not supported.

Limits

The listed peer dependency range is Jest 20 through 29; versions below 20 are unsupported. SSIM comparison is experimental, and the TypeScript definitions are community maintained and unofficial.

Plans

PlanBilled and limitsPrice
Open source packageJest >=20 and <=29 peer dependency · Install with npmFree

As github.com lists them, read 4 Oct 2026. The maker's own page has the final word.

Getting started

  1. Install the package with `npm i --save-dev jest-image-snapshot`.
  2. Use it with Jest versions 20 through 29.
  3. Provide an image, such as a browser screenshot, as the input to a visual test.
  4. Run the test to save the initial baseline image.
  5. Use Jest’s `--updateSnapshot` or `-u` option when you want to update stored snapshots.

Verdict

Choose jest-image-snapshot if you use Jest and want to compare test images against stored baselines with adjustable thresholds and reviewable diffs. Look elsewhere if you need cross-browser capture or rely on officially supported TypeScript definitions.

Questions

How much does jest-image-snapshot cost?

The package is free and open source.

Which Jest versions does it support?

The listed peer dependency range is Jest versions 20 through 29. Versions below 20 are unsupported.

How does it compare images?

It supports Pixelmatch pixel-by-pixel comparison and structural similarity (SSIM), which the project describes as experimental.

Can I use browser screenshots?

Yes. The project shows a browser screenshot being used as the image input in a visual test.

Can I update stored baselines?

Yes. Use Jest’s `--updateSnapshot` or `-u` option.

Does it provide official TypeScript support?

Its TypeScript definitions are community maintained and are not officially supported by the maintainers.

Facts from jest-image-snapshot's own pages

Browser testing
The README shows using a browser screenshot as the image input in a visual test. · github.com, 4 Oct 2026
CI image storage
The README provides an example reporter that uploads failed diff images to an AWS S3 bucket for ephemeral environments. · github.com, 4 Oct 2026
Comparison methods
It supports pixel-by-pixel Pixelmatch comparison and structural similarity (SSIM) comparison, which the README describes as experimental. · github.com, 4 Oct 2026
Diff output
The matcher can create horizontal or vertical diff layouts and optionally print a base64 diff or an iTerm inline image to the console. · github.com, 4 Oct 2026
Installation
The README gives `npm i --save-dev jest-image-snapshot` as the installation command. · github.com, 4 Oct 2026
Jest compatibility
The README lists Jest versions 20 through 29 as a peer dependency and says versions below 20 are unsupported. · github.com, 4 Oct 2026
License
The project states that contributions are governed by the Apache License 2.0. · github.com, 4 Oct 2026
Maker
American Express says it was founded in 1850 and is headquartered in New York. · americanexpress.com, 4 Oct 2026
Noise handling
A configurable Gaussian blur can help address noise from scaling images at different resolutions. · github.com, 4 Oct 2026
Purpose
A Jest matcher for comparing images, commonly used for visual regression testing. · github.com, 4 Oct 2026
Snapshots
It saves a baseline image on the first run and compares later test images against it. · github.com, 4 Oct 2026
Thresholds
Users can set per-pixel sensitivity and an overall failure threshold measured in pixels or percent. · github.com, 4 Oct 2026
TypeScript support
The README says the community-maintained DefinitelyTyped definitions may be outdated or inaccurate and are not officially supported by the maintainers. · github.com, 4 Oct 2026
Update baselines
Jest’s `--updateSnapshot` or `-u` option updates stored image snapshots. · github.com, 4 Oct 2026

Where jest-image-snapshot stands on Freedom251

Look at these too