Optimize / Transform
Output options for optimized images are;
Binary (Buffer)
Base64 String
URL (Link
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
for available transform options. See
Example Codes - Binary(form-data)
Example Codes - URL/base64
Last updated