Optimize / Transform

circle-info

Optimize / Transform file endpoint accepts multiple content-type;

  • "multipart/form-data" (for binary form-data file uploads, URL, base64)

  • "application/x-www-form-urlencoded" (URL, base64) (our usual request type)

  • "application/json" (URL,base64) (our usual request type)

circle-check

Optimize / Transform your local files or from URL

POST https://api.imagemash.io/v1/optimize

Headers

Name
Type
Description

apikey*

String

Your API Key

Request Body

Name
Type
Description

image*

Multiple

Accepts 3 type;

binary: As form-data (buffer), base64: As base64 string, URL: URL of a file. Eg. https://examle.com/logo.png

outputType

String

Return type of your optimized image. Choose which one suits your use-case.

link: A temporary URL contains image data.

base64: A base64 string represantation of image.

buffer: Binary represantation of image.

Default: link

transforms

Object

An object contains transform objects. See

Transform Options

for available transform options. See

An example transforms object

chevron-rightAn example transforms objecthashtag

Import Postman Collection Run in Postmanarrow-up-right

Example Codes - Binary(form-data)

Example Codes - URL/base64

Last updated