Skip to main content

SDK Sizes

Veryfi Lens for Browser does not add a large binary to your app. It has three parts, and only the first one ends up in your JavaScript bundle:

  1. SDK JavaScript: the veryfi-lens-wasm npm package, bundled with your app.
  2. WASM engine: the document processing engine, downloaded at runtime from lens.veryfi.com.
  3. ML models: downloaded at runtime from lens.veryfi.com. Only the models your flavor and configuration need are fetched.

The caps, code_strips, and prescription_label flavors don't use the WASM engine or ML models, so they only download the SDK JavaScript.

note

Sizes match version 3.5.12. 1 MB = 1,000,000 bytes. "Download" is the compressed transfer size.


SDK JavaScript (npm package)​

ArtifactSize
npm package (npm pack tarball)149 KB
npm package (installed in node_modules, without dependencies)603 KB
npm package (installed in node_modules, with dependencies)3.8 MB
SDK code in your bundle (minified)296 KB
SDK code in your bundle (minified + gzip)84 KB
SDK code + dependencies in your bundle (minified + gzip)136 KB

The SDK loads flavors and most dependencies with dynamic import(), so bundlers split them into separate chunks. Each user only downloads the chunks used by the flavor they open.

DependencyMinifiedMinified + gzip
jszip98 KB28 KB
@fingerprintjs/fingerprintjs39 KB16 KB
@fingerprintjs/fingerprintjs-pro12 KB5 KB

Tesseract OCR is not an npm dependency. It is loaded at runtime, and only when documentFieldsToDetect is set (see Optional features). By default it comes from the jsDelivr CDN; you can also host it yourself.


WASM Engine​

The SDK detects browser support and downloads one engine build (veryfi-wasm.js + veryfi-wasm.wasm):

BuildUsed bySizeDownload (gzip)
SIMDChrome, Edge, Firefox, Android browsers7.4 MB2.0 MB
Safari SIMDSafari (macOS and iOS)6.1 MB1.8 MB
Non-SIMDBrowsers without WebAssembly SIMD5.9 MB1.7 MB

The engine is served with an ETag, so on later visits the browser revalidates its cached copy instead of downloading the engine again.


Estimated Download Size by Lens Flavor​

Total first-load download per flavor with the default configuration. Each total includes the SDK JavaScript, the WASM engine, and the ML models.

FlavorML modelsTotal (Chrome / Android)Total (Safari / iOS)
document9.4 MB11.6 MB11.3 MB
anydocs9.4 MB11.6 MB11.3 MB
upload9.4 MB11.6 MB11.3 MB
checks8.2 MB10.3 MB10.1 MB
long_document6.9 MB9.1 MB8.8 MB
credit_card10.4 MB12.6 MB12.3 MB
caps—0.14 MB0.14 MB
code_strips—0.14 MB0.14 MB
prescription_label—0.14 MB0.14 MB

Optional features​

These options add to the totals above:

FeatureOptionAdditional download
LCD detection (documents / checks)lcdDetectionForDocuments, lcdDetectionForChecks+0.7 MB
Check front/back detectionfrontBackDetectionForChecks+1.1 MB
Local field extractiondocumentFieldsToDetect+9.4 MB

Local field extraction downloads two kinds of files. The field detection models (3.0 MB) come from lens.veryfi.com. Tesseract OCR (6.5 MB) comes from the jsDelivr CDN, or from your server when tesseractBaseUrl is set: its loader (0.01 MB), its worker (0.03 MB), its engine (1.4 MB), and the English (3.0 MB) and Spanish (2.1 MB) language data.