localPress featured image

localPress

Published on May 03, 2026

CLINodeOpen SourceTooling

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

Bash
# 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
Bash
# 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.


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.

Browse all projects
Fin.

griffen.codes

made with πŸ’– and β˜•

Β© 2026all rights reservedupdated 16 seconds ago