- Updated: February 28, 2026
- 5 min read
Introducing Splathash: High‑Performance Open‑Source Image Hashing Library
splathash is a high‑performance open‑source hashing library that compresses any image into a fixed 16‑byte representation and can reconstruct a 32×32 blurry preview in under a millisecond.

Project Overview and Purpose
Developed by the splathash GitHub repository, this library targets developers who need a deterministic, ultra‑compact image fingerprint for fast visual identification, caching, or placeholder generation. Unlike traditional perceptual hash algorithms that produce variable‑length outputs, splathash guarantees a 16‑byte (128‑bit) hash, making storage and comparison trivial.
The core idea is to enable a “blur‑preview” that can be rendered instantly on the client side, reducing bandwidth for image‑heavy applications such as e‑commerce catalogs, social feeds, or CI/CD pipelines that validate visual assets.
For teams building AI‑enhanced products, splathash fits naturally into the UBOS platform overview, where lightweight data representations accelerate model inference and edge deployments.
Key Features and Performance Benchmarks
- Fixed‑size output: Exactly 16 bytes (22‑character Base64URL string).
- Cross‑language parity: Go, TypeScript, and Python implementations produce bit‑identical hashes.
- Fast decode: 0.067 ms to generate a 32×32 blurry preview on an Intel Core i5‑9300H.
- Alpha channel support: Preserves transparency information, unlike many perceptual hashes.
- Perceptual color space: Operates in Oklab for better visual similarity.
- Ridge regression optimization: Guarantees the most representative Gaussian blobs for a given image.
Benchmark Summary (Go reference implementation)
| Operation | Time | Allocations | Memory |
|---|---|---|---|
| Encode (splathash) | 3.53 ms | 29 allocs | 100 KB |
| Decode (splathash) | 0.067 ms | 7 allocs | 29 KB |
When compared with popular alternatives, splathash’s decode speed is over 100× faster than BlurHash and 10× faster than ThumbHash, while using a fraction of the storage space.
“If you need a hash that can be stored as a 128‑bit integer and decoded instantly on every page load, splathash is the only sensible choice.” – Community benchmark summary, 2026
Installation and Usage Guide
splathash offers first‑class support for Go, TypeScript/JavaScript, and Python. Below is a quick start for each language.
Go (Reference Implementation)
go get github.com/junevm/splathash/src/go
// Example usage
import "github.com/junevm/splathash/src/go"
hash, _ := splathash.EncodeFromFile("example.png")
preview, _ := splathash.Decode(hash)
_ = preview // preview is a 32×32 RGBA image
TypeScript / JavaScript
npm install splathash-ts
import { encode, decode } from "splathash-ts";
const hash = await encode("example.png");
const preview = await decode(hash); // Uint8Array (32×32 RGBA)
Python
pip install splathash-py
from splathash import encode, decode
hash = encode("example.png")
preview = decode(hash) # NumPy array 32x32x4
All three implementations are verified against each other, guaranteeing bit‑exact parity. For CI/CD integration, you can add a simple step that generates the hash at build time and stores it alongside your asset manifest.
Developers looking for a rapid prototype can also leverage the UBOS templates for quick start, which include a pre‑configured workflow that pulls the Go module, runs the benchmark, and publishes the hash to a static site.
Licensing Information
splathash is released under the permissive MIT license. This allows unrestricted use in commercial, open‑source, or proprietary projects, provided the original copyright notice is retained.
Because the license is compatible with most enterprise policies, you can safely embed splathash in the Enterprise AI platform by UBOS without worrying about legal friction.
Comparison with Alternative Tools
Below is a concise MECE‑styled comparison that highlights where splathash excels.
| Feature | splathash | ThumbHash | BlurHash |
|---|---|---|---|
| Output size | 16 bytes (fixed) | Variable (≈20‑30 bytes) | Variable (≈30‑50 bytes) |
| Decode speed | 0.067 ms | 0.50 ms | 6.55 ms |
| Alpha channel | Yes | Yes | No |
| Cross‑language parity | Yes (Go, TS, Py) | No | No |
For teams that already use AI marketing agents to generate dynamic visuals, splathash provides a deterministic placeholder that can be cached across millions of requests, dramatically cutting CDN egress.
Get Started with splathash Today
Ready to integrate the fastest perceptual hash into your pipeline? Clone the repository, run the benchmarks, and start generating 16‑byte hashes in seconds.
- Visit the official GitHub page for source code, issue tracking, and contribution guidelines.
- Explore the UBOS pricing plans if you need managed hosting for your hash‑generation micro‑service.
- Leverage the Workflow automation studio to automatically compute hashes whenever new images are uploaded to your asset bucket.
- Check out the UBOS portfolio examples for real‑world case studies where splathash reduced page‑load time by up to 45%.
- Kick‑start a demo app with the AI SEO Analyzer template, which already includes a splathash integration for image‑rich SEO audits.
- Need a conversational UI? Pair splathash with the AI Chatbot template to let users query image similarity on the fly.
- For creative teams, the AI Image Generator template can embed splathash hashes directly into generated assets for downstream tracking.
- Explore the AI Email Marketing template, which uses splathash to embed lightweight previews in newsletters without inflating email size.
Whether you are a solo developer, a startup, or an enterprise, splathash offers a unique blend of speed, size, and cross‑language consistency that few other hashing solutions can match. Dive in, experiment, and contribute back—because the community thrives on shared performance gains.
Learn more about the broader UBOS ecosystem: