cdnimag.es

image manipulation on the fly + CDN = AWESOME! see how awesome

Get an Invite

We're not ready for everybody just yet. Get on the list and we'll let you know

Examples

How it works

  • Overview

    It's pretty simple. We setup a Cloudfront Distribution for you that points to our servers as the origin. You upload images to your S3 bucket. When you request your images from Cloudfront, we pull them from S3, resize them on the fly and return them to Cloudfront. You get all the benefits of dynamically sized images and a CDN! We told you it was awesome!

  • Request URI

    Request URIs are composed of two main parts; 'Image Path' & 'Commands'. These parts are separated by a dollar sign "$".

    http://demo.cf.cdnimag.es/size:150x120/$/teamcoco.gif
    • Image Path

      The relative path to the image you'd like to manipulate. The path should be relative to the bucket you're using. Remember not to include the bucket in the path.

      demo/teamcoco.gif
    • Bucket

      Name or Alias of the S3 bucket the 'Image Path' is relative to

      Example: bucket:{bucketNameOrAlias}
    • Signature

      MD5 hash of a concatenated string containing the Request URI (excluding the sig: command) and your cdnimag.es API Secret

      Example: sig:{md5Hash} Generating Signature: md5($secret.$uri);
    • Image Commands

      A list of image manipulation commands

      Example: size:10x10/scale:min
  • Image Commands

    • Size

      Width & Height of the resulting image. Can not be used with "Percent" command.

      Example: size:100x100
    • Percent

      Size of the image as a percentage of the original. Can not be used with "Size" command.

      Example: percent:50
    • Frame

      Scale then crop the image to the given size. [Default: false]

      Example: frame:true
    • Crop

      Crop the image to the given size or percent. [Default: false]

      Example: crop:true
    • Scale

      Resample the image to the given size or percent. Values: max = Scale to max size / min = Scale min proportional size [Default: Max]

      Example: scale:min
    • Valign

      The vertical pixel or anchor position of the resulting image. Values: pixels, top, bottom, center. [Default: center]

      Example: valign:top
    • Halign

      The horizantal pixel or anchor position of the resulting image. Values: top, bottom, left, right, center. [Default: center]

      Example: valign:top
    • Reflection

      Reflect the source image. This will double the height of the image. Use bg: and opacity: to set background color and relection opacity. [Default: false]

      Example: reflection:false
    • Background Color

      The background hex value (excluding the hash '#'). Only available when using reflection:

      Example: bg:fff
    • Opacity

      Image opacity value (float). Only available when using reflection:

      Example: opacity:.4
    • Output

      The format of the resulting image. Values: jpeg, gif, png. [Default: original image format]

      Example: output:png
    • Rotate

      Rotate the image the give number of degrees. Will be processed after all other commands. Resulting image may not conform to size: command

      Example: rotate:90
  • API

    • Overview

      api.cdnimag.es allows you to upload, retrieve and delete images from account

      URL: http://api.cdnimag.es/v1/$domain/$method/$imagePath
    • Authentication

      All requests to the API must include your API Key and a request signature as HTTP Headers.

      X-CdnImages-Key & X-CdnImages-Sig
    • Signatures

      To generate request signature, combine your API Key, request URL and paramater string

      md5($secret.$url.$parameters);
    • Image (Post)

      Post (upload) an image to your account

      URL: http://api.cdnimag.es/$domain/image/$path Example: http://api.cdnimag.es/demo.cdnimag.es/image/test/image/img.jpg HTTP Method: POST Parameters:
        data = base64 encode string with image data
© 2010 kuhl.co - all rights reserved - support: irc or email - made by @traviskuhl & @rochers