Patu

Use Patu anywhere

Patu is an HTTP API, but you rarely call it by hand. Drop it into WordPress, your front-end build, or CI, and it optimizes your assets where they already live. All you need is a free API key.

WordPress

Patu Optimizer

Shrink your media library straight from wp-admin. New uploads optimize automatically; one bulk pass handles everything already there. Two modes: in-place JPEG/WebP that keeps every URL, or next-gen AVIF/WebP delivery through a <picture> tag. Originals are backed up, so any image restores in one click.

Node & build tools

npm packages

Optimize a build directory in one command, or wire Patu into Vite so every vite build ships optimized assets.

# optimize a folder in place
PATU_KEY=your_key \
  npx @patu.dev/cli ./dist
// vite.config.js
import patu from '@patu.dev/vite'
export default {
  plugins: [patu()]
}
CI / CD

GitHub Action

Optimize your build output on every push, before it ships. Add one step after your build and pass your key as a repository secret.

- uses: Gheop/patu-action@v1
  with:
    directory: dist
    api-key: ${{ secrets.PATU_KEY }}
Everything else

The HTTP API

One POST with the raw asset bytes, from any language. Images, SVG, JS, CSS, fonts, EPUB, CBZ/CBR and Office documents.

curl -H "X-Api-Key: $PATU_KEY" \
  --data-binary @photo.jpg \
  https://patu.dev/v1/compress

Get a free API key →