Drop an image, JS, CSS or a font, click to pick one, or paste a URL.
The demo favors latency over size: it downscales large images and uses fast encoder settings. For the smallest files, use the API with your own parameters.
or scan your whole site →
Lighten your front end.
The smallest web-weaver, for the lightest web.
Patu optimizes the static assets a page ships: images, SVG, JavaScript, CSS and fonts. Images target a perceptual quality score; everything else is converted losslessly. Send an asset, get back something smaller that renders identically. Inline, or stored behind a CDN with a URL manifest and Subresource Integrity.
What it does
- Images at a quality you pick by look. It searches encoder quality to hit an ssimulacra2 score, not a guessed Q, and returns AVIF and WebP with a JPEG/PNG fallback plus the responsive widths you ask for.
- SVG, path and all. It sanitizes the SVG, then rewrites path geometry and structure with silk, cutting path-heavy drawings 67-88% while rendering identically.
- JavaScript and CSS. Minified with esbuild (whitespace and safe syntax, never renaming names your code exports), then compressed at the edge.
- Fonts to WOFF2. TTF/OTF/WOFF become WOFF2 via woffify, 57-70% smaller; optional glyph subsetting drops what a page never uses.
- Subresource Integrity, built in. Every response carries an
X-Patu-IntegritySHA-384 token, so a page can pin an asset that even a compromised CDN cannot alter. - Inline or stored, deduplicated. Get the bytes back, or let Patu keep the variants and hand you a URL manifest served from the edge. Identical inputs are de-duplicated by content hash, and Patu never returns more than it received.
Quickstart
Patu is API-key authenticated. Send the raw bytes; declare non-image assets with Content-Type.
# Inline: get the optimised bytes back curl -X POST "https://patu.dev/v1/compress?formats=avif,webp,fallback&target=80" \ -H "X-Api-Key: $PATU_KEY" \ --data-binary @photo.jpg -o photo.avif # JS, CSS or a font (routed by Content-Type) curl -X POST "https://patu.dev/v1/compress" \ -H "X-Api-Key: $PATU_KEY" -H "Content-Type: font/ttf" \ --data-binary @Inter.ttf -o Inter.woff2 # Stored: persist the variants, get a JSON manifest of URLs curl -X POST "https://patu.dev/v1/compress?mode=stored&widths=480,1024" \ -H "X-Api-Key: $PATU_KEY" \ --data-binary @photo.jpg
No API key? Drop an image, JS, CSS or font above to try the public demo endpoint. Full parameters, response shapes and the asset endpoints are on the API page.