Image Optimization
OperationalCompress and resize images without visible quality loss
API Overview
The Image Optimization API reduces image file sizes dramatically while maintaining perceptual quality. Submit images as base64-encoded payloads and specify your target quality, maximum dimensions, and preferred output format. The service applies modern compression codecs (WebP, AVIF) where appropriate and strips non-essential metadata. Typical results are 60–80% file size reduction. Ideal for optimizing user-uploaded content, automating asset pipelines, and improving web performance scores.
60–80% Size Reduction
Applies perceptual compression to dramatically shrink file sizes with no visible quality loss.
Smart Resizing
Resize to maximum dimensions while preserving aspect ratio — no distortion.
Modern Codecs
Outputs to WebP or AVIF for the smallest possible files on modern browsers.
Metadata Stripping
Removes EXIF, IPTC, and XMP metadata to protect privacy and reduce file size further.
terminal API Playground
Live Simulationimport requests
import base64
with open("photo.jpg", "rb") as f:
encoded = base64.b64encode(f.read()).decode()
url = "https://api.picopayd.codefission.co.uk/media/api/optimize"
headers = {
"Content-Type": "application/json",
"X-PAYMENT": "<402-payment-token>"
}
payload = {
"image": encoded,
"format": "webp",
"quality": 80,
"maxWidth": 1200
}
response = requests.post(url, json=payload, headers=headers)
data = response.json()
print(f"Compression ratio: {data['compressionRatio']}") {
"success": true,
"format": "webp",
"originalSizeBytes": 512000,
"optimizedSizeBytes": 98304,
"compressionRatio": 0.81,
"image": "UklGRn...",
"encoding": "base64"
}