Optimize your WordPress media locally. No cloud, no credits, no subscriptions.
localpress puts your laptop’s CPU and GPU to work on your WordPress media library – compression, background removal, format conversion, and round-trip desktop editing – then syncs everything back via the REST API.
π What is localpress?
WordPress image optimization is dominated by freemium cloud plugins – Smush, ShortPixel, Imagify – that charge monthly fees and route your images through third-party servers. One option does local processing (EWWW), but it runs on the web server, which means exec() access that shared hosts often block.
localpress takes a different approach: your machine is the runtime. Install the CLI, point it at any WordPress site via Application Passwords, and your M-series Mac (or Linux box) handles the heavy lifting. No plugin required on the WordPress side. No SaaS account. No per-image credits.
β¨ Key Capabilities
Audit and Discovery
Before you optimize anything, you need to know what’s worth fixing. localpress audit scans your media library and surfaces the real waste: images never processed, files larger than their display size, missing alt text, perceptual duplicates via dHash, and broken attachment references. localpress references tells you every post and page using a given attachment before you touch it.
Compression and Conversion
Two encoding backends: sharp (libvips, default) and jSquash WASM codecs for OxiPNG-level PNG compression. Convert JPEG to WebP, PNG to AVIF, resize while preserving aspect ratio – all idempotent via SHA-256 hashing so re-running is always safe. Bulk operations dry-run by default; pass --apply when you’re ready.
AI Background Removal (Local)
localpress remove-bg runs U2-Net models via ONNX Runtime entirely on your machine. No cloud API, no per-image charge. Three model options: u2net (~176MB, best quality), silueta (~44MB, balanced), and u2netp (~4.7MB, fast). ShortPixel charges 1 credit per background removal; your M-series Mac does it in about 1.5 seconds for free.
Round-Trip Desktop Editing
localpress edit <id> downloads the attachment, opens it in your preferred editor (GIMP, Photoshop, Preview, Affinity – whatever), watches for saves via chokidar, and automatically uploads changes back to WordPress. This is the workflow designers actually want, and no other WordPress media tool offers it.
AI Agent Integration
A companion skill (skill/SKILL.md) teaches AI agents how to drive the CLI and compose it with whatever WordPress MCP server you already have. localpress doesn’t replace your existing integration layer – it adds local processing capabilities on top of it.
π― Who It’s For
Solo developers and freelancers running 1-20 WordPress sites who don’t want a recurring SaaS bill just to compress images. localpress is a one-time install with no subscription.
Small agencies managing client sites who need background removal and format conversion without routing client assets through third-party cloud processors.
AI-tool users working with Claude Desktop, Cursor, or VS Code with MCP who want agents to handle media operations as part of broader workflows – without a paid service in the loop.
β‘ Quick Start
# Homebrew (macOS / Linux)
brew install gfargo/localpress/localpress
# Or from source (requires Bun >= 1.1.0)
git clone https://github.com/gfargo/localpress.git
cd localpress && bun install && bun run dev -- --help# Connect to a WordPress site
localpress init
# Audit your media library
localpress audit
# Optimize everything unprocessed
localpress optimize --unoptimized --apply
# Remove background from a product photo (locally)
localpress remove-bg 456
# Open in your desktop editor, auto-sync on save
localpress edit 456 --with "Photoshop"π Real-World Usage
Running localpress optimize --unoptimized --apply against a media library with 45 unprocessed images saved 1.2 GB in a single pass during development testing. Results vary based on your existing image formats and sizes – run localpress audit first to get a realistic picture of your library’s waste before committing to a bulk operation.
π Links
- GitHub: https://github.com/gfargo/localpress
- Homebrew tap: https://github.com/gfargo/homebrew-localpress
- Releases: https://github.com/gfargo/localpress/releases
- Issues / Roadmap: https://github.com/gfargo/localpress/issues
- License: MIT
Give it a try if you’re tired of paying cloud services to do what your own machine handles in seconds.
Like what you saw?
There's more where that came from.

