Skip to content
PluginStats

vitest-image-snapshot weekly downloads statistics

npm · Testing

Visual regression testing for images. Compare rendered outputs against reference images to catch visual bugs.

View on npm Fresh · Oct 17, 2026

vitest-image-snapshot has 4,394 recorded weekly downloads on npm, a decrease of 63.7% over the past 30 days.

It ranks #1121 of 2,251 tracked npm listings by weekly downloads.

Over 90 days, weekly downloads changed by -54.2%.

PluginStats has 543 daily observations since Apr 23, 2025; the latest is from Oct 17, 2026.

Weekly downloads
4,394
Official API · Oct 17, 2026
7-day growth
-50.5%
-4.5K weekly downloads
30-day growth
-63.7%
-7.7K weekly downloads
90-day growth
-54.2%
-5.2K weekly downloads
Rank
#1121
Among tracked npm listings

About vitest-image-snapshot

Image Snapshot Testing

Visual regression testing for images. Compare rendered outputs against reference images to catch visual bugs.

• Native vitest integratio • Accepts ImageData or PNG buffers - test WebGPU, Canvas, or any image processing • Aggregated HTML diff report for visual failures

Setup

1. Install

2. Import in your test file

3. (Optional) Configure HTML diff report

Configure the reporter in vitest.config.ts:

Default behavior (no configuration): • Report location: {vitest.config.root}/image_diff_report/index.html • Auto-open: failures (can override with IMAGE_DIFF_AUTO_OPEN=always or IMAGE_DIFF_AUTO_OPEN=never env var)

Configuration options: • reportPath: Absolute or relative to config.root (default: 'image_diff_report') • autoOpen: Auto-open report in browser on failures, always or never (default: 'failures' or 'never' on CI) • port: Port for html report server (default: 4343)

Basic Usage

Accepts standard browser ImageData or Buffer (pre-encoded PNGs):

Options

See Match Options for all available configuration options.

Updating Snapshots

When you intentionally change shader behavior:

Diff Report

If you added ImageSnapshotReporter to vitest.config.ts, failed tests generate a self-contained HTML report with: • Expected vs Actual side-by-side • Diff visualization (mismatched pixels highlighted) • Mismatch statistics • All images copied to report directory (portable and shareable)

Default location: {vitest.config.root}/image_diff_report/index.html

Monorepo behavior: In workspace mode (running tests from workspace root), each package's report goes to its own directory when using absolute paths in config.

Auto-open on failure:

Or enable via inline reporter config:

IMAGE_DIFF_AUTO_OPEN will override reporter config if both are set.

CI

When a CI environment is detected then IMAGE_DIFF_AUTO_OPEN and config options are ignored and autoOpen is set to "never".

The report is still generated and can be saved as an artifact for review or published to a static hosting service if you prefer.

Directory Structure

Notes: • image_actual/ saves on every run (pass or fail) for manual inspection • Report copies all images to image_diff_report/ preserving directory structure • Report is self-contained and portable (can be zipped, shared, or committed)

API Reference

toMatchImage()

Vitest matcher for comparing images against reference snapshots.

Parameters:

• imageData: ImageData | Buffer - Image to compare • nameOrOptions?: string | MatchImageOptions - Snapshot name or options

Match Options:

How Comparison Works

Image comparison uses pixelmatch, which converts RGB to YIQ color space for perceptually-weighted comparison. YIQ separates luminance (Y) from chrominance (I, Q), making the comparison more aligned with human perception than raw RGB byte comparison.

The threshold option (0-1) controls sensitivity to color differences in YIQ space.

Color space note: Images are compared as raw RGBA bytes. If using display-p3 (supported in WebGPU via GPUCanvasConfiguration.colorSpace), ensure both reference and actual images use the same color space.

Examples

WebGPU Shaders

Canvas/DOM ImageData

Troubleshooting

"No reference snapshot found"

First run: Snapshot created automatically CI: Run with -u locally first, then commit snapshots

Images don't match but look identical

• threshold too strict - increase tolerance • GPU/driver differences - use allowedPixelRatio • Anti-aliasing differences - set includeAA: true

Build Version

vitest-image-snapshot is currently part of the wesl-js monorepo. (It'll eventually move to it's own repo).

Contributions

See Implementation.md for details and feature ideas.

Description from the npm listing.

  • image
  • snapshot
  • testing
  • visual-regression
  • vitest
  • vitest-plugin

Where vitest-image-snapshot sits in the listing

Each band is one page of 20. Weekly downloads on a log scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.

All npm2,248 listings · 113 pages · page 57, #1 (overall #1121)
All npm: every listing in weekly downloads order
PNG SVG
Testing21 listings · 2 pages · page 1, #2 (overall #2)
Testing: every listing in weekly downloads order
PNG SVG

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

vitest-image-snapshot weekly downloads on npm, last 90 days: 4,394 weekly downloads as of Oct 17, 2026, -54.2% over 90 days.vitest-image-snapshotWeekly downloads on npm · Last 90 days4,394downloads / week-54.2% over 90 days05K10K15K20KJul 19Aug 3Aug 18Sep 2Sep 17Oct 2Oct 17downloads / weekobservedarchived (Internet Archive)no observationsJul 20, 2026 – Oct 17, 2026 · 90 observations · Updated Oc…pluginstats.com
vitest-image-snapshot weekly downloads on npm, last 90 days: 4,394 weekly downloads as of Oct 17, 2026, -54.2% over 90 days.
PNG SVG

7/30/90-day growth

vitest-image-snapshot weekly downloads growth on npm: -50.5% over 7 days, -63.7% over 30 days, -54.2% over 90 days.vitest-image-snapshotWeekly downloads growth on npm4,394downloads / week now7-day growth-4,481 weekly downloads-50.5%30-day growth-7,712 weekly downloads-63.7%90-day growth-5,208 weekly downloads-54.2%Growth vs. nearest observation to each baseline date · Updated Oct 17, 2026pluginstats.com
vitest-image-snapshot weekly downloads growth on npm: -50.5% over 7 days, -63.7% over 30 days, -54.2% over 90 days.
PNG SVG

Ranking history

vitest-image-snapshot npm ranking history: currently #1121 (by weekly downloads).vitest-image-snapshotnpm ranking · by weekly downloads · Last 90 days#1121current rank#400#500#600#700#800#900#1000#1100#1200Jul 20Aug 4Aug 19Sep 3Sep 18Oct 3Oct 18rankOct 17, 2026 – Oct 18, 2026 · 2 observations · Updated Oct 17, 2026pluginstats.com
vitest-image-snapshot npm ranking history: currently #1121 (by weekly downloads).
PNG SVG

Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.

Recent observations

Full history (543)
Recent weekly downloads observations for vitest-image-snapshot
Date (UTC)Weekly downloadsChange vs. previous
4,394-213
4,607+382
4,225-2.7K
6,883-2.1K
9,0260
9,026+180
8,846-29
8,875+24
8,851+126
8,725+459
8,266+153
8,113-2.6K
10,688-29
10,717—

Similar npm Testing plugins

Data source

Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.

Listing: https://www.npmjs.com/package/vitest-image-snapshot. First seen Oct 16, 2026; last successful collection Oct 18, 2026. See the methodology.