Basics

Using our API is really easy. Just post an image to our store-page:

<form action="https://zimg.ml/store.php" method="post"
      enctype="multipart/form-data">
   <input name="image" type="file" />
   <input type="submit" />
</form>

Try it out:

What you get back

The response back is a simple json string. That contains a success field and a payload field. Incase of an error the success field is set to false and payload is the error message.

{ "success": true, "payload": {
  "uid": "AA01",
  "uri": "https://i.zimg.ml/AA01.png",
  "link": "https://zimg.ml/AA01",
  "name": "image.png",
  "format": "image/png"
}

Base64 encoded image

We also accept images that are encoded using base64 string encoding. If you use this option you also have to supply the name of the image with the name parameter.

<form action="https://zimg.ml/store.php" method="post" 
      enctype="multipart/form-data">
   <input name="name" value="logo.png" type="hidden" />
   <input name="image" 
          value="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA..." 
          type="hidden" />
   <input type="submit" />
</form>

Try it out:

Limitations

We do not have any limitations.