How I Built a Free Image Optimization API (with WordPress Plugin Integration)
Modern websites live and die by performance. Large, unoptimized images are still one of the biggest reasons pages load slowly β especially on eCommerce and WordPress sites.
Thatβs why I built TinySharp, a free image optimizer that comes with:
π API access (beta) β for developers who want to integrate image compression directly into their workflow.
π WordPress plugin β so site owners can bulk-optimize their Media Library without leaving the dashboard.
π οΈ Free web tools β quick drag-and-drop optimizers for everyday use.
Example: Using the TinySharp API with Node.js
Hereβs a minimal snippet showing how you can send an image to the API and get a compressed WebP version back:
import fetch from “node-fetch”;
import fs from “fs”;
async function optimizeImage() {
const res = await fetch(“https://api.tinysharp.com/optimize“, {
method: “POST”,
headers: { “Authorization”: “Bearer YOUR_API_KEY” },
body: JSON.stringify({
url: “https://example.com/image.jpg“,
format: “webp”,
quality: 80
})
});
const buffer = await res.arrayBuffer();
fs.writeFileSync(“optimized.webp”, Buffer.from(buffer));
}
optimizeImage();
This snippet fetches a remote image, compresses it via TinySharp, and saves it locally as WebP.
Why I Open-Sourced a Free Optimizer
There are paid tools out there (TinyPNG, Cloudinary, etc.), but I wanted to create something developer-friendly, free to start, and with WordPress support out of the box.
β‘ Results: Reduce images from 1.5 MB β a few KB without visible quality loss.
π¦ Integration: WordPress plugin for non-tech users.
π API: Simple JSON interface for devs.
Try the free audit tool β TinySharp Audit
Install the WordPress plugin (beta)
Or play with the API directly (docs + Postman collection included)
Would love feedback from other devs β what integrations would you find most useful? (Next.js, Gatsby, Shopify, something else?)