Image Optimizer documentation

Convert images to WebP or AVIF on the fly and serve them from a 12-city CDN. Drop-in WordPress plugin, Plesk extension, or REST API.

https://image-optimizer.api.jetweb.appREST APIEU-hosted

Overview

The Image Optimizer API accepts a source image URL (or upload) and returns an optimized version in WebP or AVIF. Existing image URLs on your site keep working — the optimizer rewrites them lazily via the WordPress plugin or via an edge rule on your CDN.

Quick start

Send a POST request with the source URL and target format. The response contains the optimized CDN URL you can embed in your HTML.

bash
curl -X POST https://image-optimizer.api.jetweb.app/api/optimize \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/photo.jpg",
    "format": "webp",
    "quality": 80
  }'

Authentication

Every API endpoint requires a Bearer token. Generate one in the dashboard under "API Keys" for the relevant product. Keep tokens server-side — never commit them to public repositories or ship them in frontend bundles.

bash
Authorization: Bearer YOUR_API_KEY

Endpoints

Base URL: https://image-optimizer.api.jetweb.app

POST
/api/optimize
Optimize a single image. Accepts url, format (webp/avif), quality (1–100), and optional width/height.
GET
/api/history
List recently optimized images for the authenticated account.
GET
/api/usage
Returns the current usage quota and remaining allowance for the authenticated account.
GET
/api/cdn/:domain/:path
Fetch an optimized asset directly from the CDN. Useful for testing; production clients should embed the returned CDN URL.

Integrations

Install the WordPress plugin from wordpress.org, or activate the Plesk extension. For custom stacks, call the REST API directly — every client library that can POST JSON will work.