Upload images

Amend is a cloud based service to provide hassle free and robust image management solution, covering complete life cycle of image upload, store, administration, transformation, optimization and delivery.

Amend offers very easy to use upload functions in its SDKs to upload image resources to the cloud and once uploaded you can perform various image transformations without writing long lines of code.

Uploaded images are available to be used for transformations like compression, resize, rotate etc. and transformed images can be accessed from web/mobile applications. (Check image transformation section for detailed feature list).

Amend’s image management service offers following operations:

Uploading images to the cloud

Uploading is done over HTTP or HTTPS using a secure protocol based on your account's amend_name, access_key and access_secret parameters. When using Amend's SDKs, the 3 security parameters are generally configured globally, but they can be provided with each call instead.

Uploading images to amend can be done easily using our SDKs :

The Amend upload function performs validated API call for upload over HTTP/HTTPS while uploading the image file:

Amend.upload(file, callback);
Amend.with(context).upload(file, callback);
[[[[Amend alloc] init]  initForUpload:self.ivPickerImage.image RequstCode:0 Delegate:self] upload];

Upload operation is performed synchronously and once completed, the uploaded image is immediately made available for transformation and delivery.

Image Name - the image identifier

Every uploaded image on Amend is uniquely identified with the parameter Image Name which is unique against your amend name. This string type parameter (Image Name) is used as reference to form dynamic delivery URLs, these URLs also have transformation parameters.

If you don't pass Image Name parameter in API call for uploading image, you will get a random image Name which is assigned in response to the call. Random image_name is having a set pattern and contains your amend name and a random numeric value that will form a name like this: test_12812. So if your amend name is ‘test’, the URL for accessing this image would be:


It is recommended that you should assign image_name parameter while uploading the image, this will be helpful to make your delivery URLs readable. For example:

Amend.upload(sampleImage, "sample_id");
Amend.upload($sampleImg, "sample_id");
[[[[Amend alloc] init] initForUpload:self.ivPickerImage.image RequstCode:0 Delegate:self] uploadWithImageName:@"Name_of_image"];

Data upload options

Amend offers you ease in uploading images which are already on web by allowing you to fetch and store these images in amend with a single line of code. You just need to specify their URLs instead of uploading the image. In this case, this helps in faster migration of existing images. For example:


You can upload an image by specifying the Data URI in Base 64 encoding of an image file (no larger than 6 MB). For example:


Upload response

An upload API call returns a response with following parameters: HTTP/HTTPS URLs referring to uploaded image, Image Name, dimensions, image mimetype. Here’s an example of the JSON response received:

    ImageName : "sample.jpg"
    Width : 450
    Height : 203
    Size : 2100    
    MimeType : "image/jpg"
    Resolution : 300
    CreatedDate : "2016-09-10T13:25:11Z"
    CDNUrl : "http://amend.cloud/test/image/sample.jpg"
    SecureCDNUrl : "https://amend.cloud/test/image/sample.jpg"

For more information on uploading images from server side code for specific frameworks, see .NET, PHP, jQuery, iOS or Android .

Image Management

Images can be managed through Amend's API or Media Libraryin your developer console, following actions on an uploaded image file:

  • Delete the image.
  • Rename the image by changing its Image Name.

Deleting images

Deleted images are immediately deleted permanently from your amend cloud storage with the destroy function. However, images accessed by your website/mobile applications might still be available through cached copies on the CDN

Note that it usually takes a few minutes (although it might take up to an hour) for the invalidation to fully propagate through the CDN.

For example, deleting an image with the Image Name of "sample":

Amend.destroy('sample', function (error, result) {console.log(result) });
Amend.with(context).destroy('sample', callback);

Renaming images

Rename operation is immediately performed and starts reflecting change from very next call, the rename function is used for this purpose. Any existing URLs of renamed images will no longer be valid once rename operation is carried.

Note: It takes some time (from couple of minutes to an hour) to fully propagate the change through the CDN.

For example, renaming an image with the Image Name of old_name to new_name:

Amend.Rename("oldName", "newName")
Amend::rename('old_name', 'new_name');
Amend.rename('old_name', 'new_name', function(error, result) { console.log(result) })
Amend.with(context).rename("oldName", "newName", callback);