Condense compresses images, audio, video, code, and WebAssembly through Buffers and Streams — stateless processing built for APIs, microservices, and serverless runtimes where disk I/O is undesirable.
Interactive visualization based on the project's real-world publishing benchmarks. Select a target to see file size reductions across different compression presets.
Uploads and assets are processed entirely through Buffers and Streams. No state, zero temporary files written to disk.
Optimizations run cleanly in request handlers. No central worker databases, and perfect compatibility with load-balanced servers.
Perfect for lightweight, serverless runtimes (AWS Lambda, Cloud Functions) where write permissions are constrained.
Includes built-in dynamic image aspect-ratio adjustments using
standard width, height, and
fit API parameters.
Extracts beautiful JPEG/PNG video thumbnails and supports instant Standard MP4 Faststart optimizations directly on streams.
Dramatically reduces latency of static asset processing via an
active memory store. Enable instantly via
CONDENSE_CACHE=true.
Visually lossless, highly secure compression preset that keeps maximum resolution and structure intact.
An ideal equilibrium. Uses mild lossy compressions (e.g., 65% Quality for JPEGs, CRF 26 for video feeds).
Forces conversions to modern formats, strips console logs, clears WASM custom tags, and downscales video structures.
Opt out specific segments or entire assets from optimization using standard, non-intrusive annotations.
<!-- Use data-condense-ignore attribute -->
<div data-condense-ignore>
<pre>
Preserves exact formatted spacers
</pre>
</div>
/* condense-ignore */
function legacyParser() {
// Spacing & keywords will stay untouched
var size = 10;
}
# Optimize a single local asset
npx @studioframes/condense optimize photo.png -o out.webp --method extreme
# Direct directory-wide bundle minimization
npx @studioframes/condense optimize ./src/ -o ./dist/ --method balanced
const express = require('express');
const { condenseApp } = require('@studioframes/condense');
const app = express();
app.use('/v1', condenseApp);
app.listen(8080, () => {
console.log('POST files to http://localhost:8080/v1/optimize');
});
const { optimizeImage } = require('@studioframes/condense');
const { buffer, outMime } = await optimizeImage(
rawBuffer, 'image/png', 'quality'
);
// Returns lightweight optimized Buffer directly back into RAM