Image Converter
Convert images between formats and resize them.
Endpoint
POST https://www.acrewity.com/api/services/execute
Authentication
Include your API key in the Authorization header:
Authorization: Bearer YOUR_API_KEY
n8n Integration
This service is also available via our n8n community node: @acrewity/n8n-nodes-acrewity
Operations
Convert Image
Convert images between formats with optional resizing. Provide ONE of: imageUrl (or image_url/url), imageFile (or image_file/file), or imageData (or image_data/data/image).
Operation ID: convert_image
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
format |
string | Yes | - | Target image format Options: jpg, jpeg, png, webp, gif, bmp, tiff, ico |
imageUrl |
string | No | - | URL of image to convert. Aliases: image_url, url |
imageFile |
file | No | - | Base64 encoded image file. Aliases: image_file, file |
imageData |
string | No | - | Base64 image data (with or without data URI prefix). Aliases: image_data, data, image |
quality |
number | No | 85 |
Image quality (1-100) (min: 1, max: 100) |
width |
number | No | - | Resize width in pixels (maintains aspect ratio) (min: 1, max: 10000) |
height |
number | No | - | Resize height in pixels (maintains aspect ratio) (min: 1, max: 10000) |
Example Request
Convert PNG to WebP (from URL):
{
"service": "image-converter",
"operation": "convert_image",
"parameters": {
"imageUrl": "https://example.com/images/hero-image.png",
"format": "webp",
"quality": 85
}
}
Convert and Resize for Thumbnail:
{
"service": "image-converter",
"operation": "convert_image",
"parameters": {
"imageUrl": "https://example.com/images/product-photo.jpg",
"format": "jpeg",
"quality": 80,
"width": 300,
"height": 200
}
}
Convert Base64 Image:
{
"service": "image-converter",
"operation": "convert_image",
"parameters": {
"imageData": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAB...",
"format": "webp",
"quality": 90
}
}
Example Response
{
"success": true,
"result": {
"data": {
"filename": "image-1735567890123.webp",
"contentType": "image/webp",
"size": 45320,
"content": "UklGRhYAAABXRUJQVlA4TAoAAAAvAQA...",
"downloadUrl": "/api/downloads/image-1735567890123.webp",
"downloadable": true,
"metadata": {
"originalSize": 125000,
"convertedSize": 45320,
"format": "webp",
"quality": 85,
"dimensions": { "width": 1920, "height": 1080 },
"compressionRatio": 64
}
}
},
"credits_used": 1
}
More Examples
See Visual Content Generation Examples for complete workflow examples including image optimization, thumbnail generation, and CDN preparation.