Condense is a fast file optimization engine. All in memory.
Stateless, zero-disk in-memory optimization for images, media, code, and WebAssembly in Node.js. Use optimizeImage or optimizeText in an existing
Express API, or run the CLI on your build pipeline.
Node.js
Bun
Express
Amazon Web Services
Google Cloud
Microsoft Azure
Cloudflare
Vercel
Docker
Kubernetes
Railway
DigitalOcean
Four tools, designed together.
Adopt one, or all of them.
optimizeImage and optimizeText drop
directly into existing Node.js projects. Zero
disk I/O, no temporary files.
In-Memory Engine
Accepts raw Buffers and Streams, performs lossless & lossy compression in RAM, and returns clean Buffers ready for HTTP responses.
Intelligent Resizer
Dynamic width, height, and fit modes (cover, contain, fill) with automatic WebP,
AVIF,
and PNG output transcoding.
Code & WASM Minifier
High-throughput AST-free minification for HTML, CSS, JS, TS, JSX, TSX, JSON, YAML, and in-memory WebAssembly binary stripping.
Media Utilities
Extract high-res video thumbnails at precise timestamps and write streaming MP4 faststart moov atoms without spawning shell binaries.
One engine for the whole workflow.
Install, import, stream, optimize, and serve with the same lightweight engine. Every step below is a real command with real output — click one, or just watch.
found 0 vulnerabilities
Built-in image processing, code minification and media streams.
115 KB PNG reduced to 26.7 KB WebP lossless
versus disk-heavy ImageMin child processes
quality (default), balanced (recommended), extreme
zero leak pooled buffers for high concurrency
Condense in production.
Condense powers in-flight media compression in modern microservices, serverless functions, and high-throughput web APIs:
Compress user uploads before S3 or database storage.
Direct integration with Express and Multer using MemoryStorage. Optimize incoming user avatars, documents, and product images without touching temporary disk space.
Web API GuideZero ephemeral disk drag on cold starts and executions.
AWS Lambda, Google Cloud Functions, and edge workers have strict /tmp constraints. Condense operates purely in RAM, avoiding cold-start disk overhead.
Serverless GuideBatch optimize assets in Vite, Webpack, or CI/CD.
Run npx @studioframes/condense optimize ./dist in watch mode or as a
pre-deploy GitHub Action step with full savings breakdown.
The APIs you need, baked in.
Most servers need an image resizer, a code minifier, media thumbnailing, and a compression middleware. Condense ships all of them in a single zero-dependency library.
import { optimizeImage } from '@studioframes/condense';
const { buffer, format, width, height, reduction } = await optimizeImage(
rawImageBuffer,
'image/png',
{
mode: 'balanced',
maxWidth: 1920,
maxHeight: 1080,
fit: 'contain',
outputFormat: 'image/webp',
quality: 80
}
);
console.log(`Optimized to ${format}, reduced by ${reduction}%`);
Condense is a complete toolkit.
Compare architectural features and runtime characteristics against single-purpose tools:
| Feature |
|
ImageMin | Sharp | Terser | FFmpeg |
|---|---|---|---|---|---|
| ARCHITECTURE & PERFORMANCE | |||||
| Stateless in-memory processing Zero temporary disk files written during execution | |||||
| Multi-format unified engine Images, video, code, and WebAssembly in one API | |||||
| Serverless & Edge friendly ~50MB memory footprint with no child processes | |||||
| MEDIA & CODE TRANSFORMS | |||||
| Intelligent image resizing & fit cover, contain, fill, WebP/AVIF output transcoding | |||||
| Faststart MP4 moov atom streaming Zero disk streaming transformation | |||||
Complete benchmark suite.
Tested against 11 sample asset types across all three compression modes on Node.js v24 x64:
| File | Type | Original | Quality Mode | Balanced Mode | Extreme Mode | Latency |
|---|---|---|---|---|---|---|
demo.png |
Image | 115.0 KB | 32.1 KB (-72.1%) | 26.7 KB (-76.8%) | 22.4 KB (-80.5%) | 35ms |
app.js |
Script | 5.0 KB | 2.4 KB (-52.0%) | 2.1 KB (-58.0%) | 1.9 KB (-62.0%) | 4ms |
component.tsx |
TypeScript | 4.8 KB | 2.3 KB (-52.1%) | 2.0 KB (-58.3%) | 1.8 KB (-62.5%) | 4ms |
service.ts |
TypeScript | 3.2 KB | 1.6 KB (-50.0%) | 1.4 KB (-56.3%) | 1.2 KB (-62.5%) | 3ms |
view.jsx |
React JSX | 3.6 KB | 1.8 KB (-50.0%) | 1.5 KB (-58.3%) | 1.3 KB (-63.9%) | 3ms |
demo.svg |
Vector | 8.4 KB | 4.1 KB (-51.2%) | 3.2 KB (-61.9%) | 2.8 KB (-66.7%) | 5ms |
styles.css |
Stylesheet | 4.2 KB | 2.1 KB (-50.0%) | 1.8 KB (-57.1%) | 1.5 KB (-64.3%) | 3.5ms |
index.html |
Markup | 2.4 KB | 1.2 KB (-50.0%) | 1.0 KB (-58.3%) | 0.9 KB (-62.5%) | 7ms |
config.yml |
Config | 1.8 KB | 0.9 KB (-50.0%) | 0.7 KB (-61.1%) | 0.6 KB (-66.7%) | 2ms |
data.json |
Data | 6.2 KB | 3.1 KB (-50.0%) | 2.5 KB (-59.7%) | 2.1 KB (-66.1%) | 3ms |
demo.mp4 |
Video | 1.2 MB | 1.1 MB (-8.3%) | 980 KB (-18.3%) | 850 KB (-29.2%) | 22ms |
Use it in the repo you’re already working in.
Install Condense, import optimizeImage into your upload handler, and
eliminate temporary disk bottlenecks instantly.