The image optimization
API built for developers
Compress and optimize images in real time using a simple developer-friendly API. Convert images to WebP and AVIF for faster websites and better performance.
Why compress your images?
Image optimization is the single highest-impact web performance change most websites can make.
Smaller images mean less data. Pages load faster, bounce rates drop, users stay longer.
Google uses Core Web Vitals as a ranking signal. Faster LCP directly impacts your position.
Serve 80% less data for every image. Directly reduces your CDN and hosting bills.
Mobile users on slow connections benefit most. Smaller images load faster on 3G/4G.
Our smart algorithm finds the optimal compression level per image, invisible to the eye.
WordPress plugin to REST API — integrate optimization into your workflow once and forget.
Simple, powerful, flexible
One API endpoint handles compression, conversion, resizing, and cropping. Official SDKs available for all major languages.
<?php
$ch = curl_init('https://api.speedimgs.com/api/optimize');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer YOUR_API_KEY']);
curl_setopt($ch, CURLOPT_POSTFIELDS, [
'image' => new CURLFile('/path/to/image.png'),
'format' => 'webp,avif,jpeg,svg,png,jxl',
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
import requests
url = "https://api.speedimgs.com/api/optimize"
headers = {"Authorization": "Bearer YOUR_API_KEY"}
files = {"image": open("image.png", "rb")}
data = {"format": "webp,avif,jpeg,svg,png,jxl"}
response = requests.post(url, headers=headers, files=files, data=data)
print(response.json())
curl -X POST \
https://api.speedimgs.com/api/optimize \
-H 'Authorization: Bearer YOUR_API_KEY' \
-F 'image=@/path/to/image.png' \
-F 'format=webp,avif,jpeg,svg,png,jxl'
const fs = require('fs');
const form = new FormData();
form.append('image', new Blob([fs.readFileSync('image.png')]), 'image.png');
form.append('format', 'webp,avif,jpeg,svg,png,jxl');
const response = await fetch('https://api.speedimgs.com/api/optimize', {
method: 'POST',
headers: { 'Authorization': 'Bearer YOUR_API_KEY' },
body: form,
});
console.log(await response.json());
Everything you need
Works with your tools
Need a custom integration?
SpeedImgs has a comprehensive REST API with official SDKs for Node.js, Python, PHP, Ruby, Go, and Java. Build any integration you need — we have docs, examples, and a dedicated developer support channel.