web

Image

Upload, resize, and convert images

Introduction

The image service provides upload, resize, and image conversion. It provides a CDN for uploaded images and a simple API.

Notes

Max image size is 10MB.

CDN caches content with a TTL of 1 hour.

Features

Convert

Convert an image from one format (jpeg, png etc.) to an other either on the fly (from base64 to base64), or by uploading the conversion result. To use the file parameter you need to send the request as a multipart/form-data rather than the usual application/json with each parameter as a form field.

Delete

Delete an image previously uploaded.

Resize

Resize an image on the fly without storing it (by sending and receiving a base64 encoded image), or resize and upload depending on parameters. If one of width or height is 0, the image aspect ratio is preserved. Optional cropping. To use the file parameter you need to send the request as a multipart/form-data rather than the usual application/json with each parameter as a form field.

Upload

Upload an image by either sending a base64 encoded image to this endpoint or a URL. To resize an image before uploading, see the Resize endpoint. To use the file parameter you need to send the request as a multipart/form-data rather than the usual application/json with each parameter as a form field.

Pricing

EndpointPer Request
Convert0.001 USD
DeleteBase
Resize0.001 USD
Upload0.01 USD

Base requests are 0.000001 USD

Example

Convert Request

Response

{
    "url": "cdn.images.m3o.com/your-account-id/cat.jpeg"
}