Skip to content

Post Requests

Generally, Imagizer works as a layer between users and image storage. A GET request will inform Imagizer to fetch an image from image storage and then perform image processing on that fetched image. An alternative is to POST an image file directly to Imagizer, along with some parameters, and have Imagizer return the processed image.

Multipart POST requests are supported.

TIP

POST requests on port 80 are disabled by default. See the Config Reference for details on enabling POST requests.

WARNING

Not currently supported on cloud.imagizer.com.

Example: POST an image file, scale the image to 400px width, set the quality to 65, then return the processed image.

http
POST / HTTP/1.1
Content-Type: multipart/form-data;

file=@in-image.jpg
width=400
quality=65
bash
curl -F file=@in-image.jpg -F width=400 -F {host}

Example: POST an image file, detect faces, and return JSON meta data.

http
POST / HTTP/1.1
Content-Type: multipart/form-data;

file=@in-image.jpg
meta=true
face=true
shell
curl -F file=@in-image.jpg -F meta=true -F face=true http://{host}/ -o out-meta.json

Uploads

Uploads to your S3 backend may also be enabled. See the Uploads Guide for more information.