Client

Endpoints for use by clients who convert images using the Imageproxy.

GET /convert

Resize and add image effects to images programmatically.

resize=80x80 (keeps the aspect ratio)

resize=80x80

resize=130x45&shape=cut

resize=130x45&shape=cut

resize=80x45&shape=cut&logo=premium_corner_small

resize=80x45&shape=cut&logo=premium_corner_small

resize=x38&retina=true

resize=x38&retina=true

resize=80x&retina=true&blur=2.5

resize=80x&retina=true&blur=2.5

resize=160x&dark=55

resize=160x&dark=55

resize=320&label=Katter&title=Djurpolisen&subtitle=del 10&quality=95

resize=320&label=Katter&title=Djurpolisen&subtitle=del%2010

format=png&resize=160x160&shape=cut&mask=circle

format=png&resize=160x160&shape=cut&mask=circle

resize=150x150&bgcolor=aa0000&bgheight=160&bgwidth=160

resize=150x150&bgcolor=aa0000&bgheight=160&bgwidth=160

resize=150x150&bgcolor=aa0000&bgheight=160&bgwidth=160&shape=cut

resize=150x150&bgcolor=aa0000&bgheight=160&bgwidth=160&shape=cut

resize=320&format=png&text=aa0000,22,12,13,Katter&rect=ffffff,86,30,10,10&rect=A4C400,40,40,260,120

resize=320&format=png&text=aa0000,22,12,13,Katter&rect=ffffff,86,30,10,10&rect=A4C400,40,40,260,120

  • Parameters
  • Name Description Required Type Example
    source

    The URL of the image to convert. MUST BE URL ENCODED

    Required string http%3A%2F%2Fexample.com%2Fimage.jpg
    resize

    The new size of the image, in “WxH” format. (Max limit for both width and height, defaults to 3840)

    string 100x50
    retina

    If the image should be doubled in size. Only applicable if resize is provided.

    boolean true
    shape

    The image cropping behavior. Defaults to keeping proportions. Valid values are cut and trimcut.

    string cut
    gradient

    Enable bottom gradient by setting this parameter to: bottom.

    string bottom
    gravity

    Which part of the image to crop. Defaults to center. Valid values are nw to se.

    string nw
    bgcolor

    Background color. Only useful when you have a source image with transparency.

    string 810f29
    bgwidth

    Background width. Must be used in combination with bgcolor.

    integer 100
    bgheight

    Background height. Must be used in combination with bgcolor.

    integer 200
    bgoffsetx

    Background offset on the X-axis. Must be used in combination with bgcolor.

    integer 100
    bgoffsety

    Background offset on the Y-axis. Must be used in combination with bgcolor.

    integer 100
    blur

    How much the image should be blurred. Valid values are 0.0-50.0+

    float 2.3
    dark

    How much darkness to overlay. Valid values are 0-100

    float 20
    logo

    The name of the logo to overlay. (Accepts a comma separated list of logos)

    string play
    label

    Label text

    string
    labelfg

    Label foreground color. Defaults to d8d8d4

    string d8d8d4
    labelbg

    Label background color. Defaults to 810f29

    string 810f29
    mask

    Mask the image. Only valid value is circle. Requires format=png and a size of 512x512 or smaller.

    string circle
    rect

    Rectangle with given color, size and position. (Can be used multiple times)

    string ff6600,100,10,0,0
    text

    Text with the given color, size and position.

    string cf041c,18,30,20,Example%20text
    title

    Title text

    string
    titlefg

    Title foreground color. Defaults to f7f4ea

    string f7f4ea
    subtitle

    Subtitle text

    string
    subtitlefg

    Subtitle foreground color. Defaults to d8d8d4

    string
    format

    The image format to return. Valid values are jpeg, png and gif.

    string jpeg
    quality

    Quality of encoded JPEG. Valid values are 0-100, default is 75.

    integer 75
    quantization

    [EXPERIMENTAL] Quantization of PNG images. Valid values are 1-10.

    integer 10
  • Response 200 SHOW
  • Response 400 SHOW
  • Response 500 SHOW
GET /proxy

Proxy images from source location

  • Parameters
  • Name Description Required Type Example
    source

    The URL of the image to proxy. MUST BE URL ENCODED

    Required string http%3A%2F%2Fexample.com%2Fimage.jpg
  • Response 200 SHOW
  • Response 400 SHOW

Info

Endpoints containing information about the Imageproxy.

GET /__status

Whatsup status document.

  • Response 200 SHOW
  • < Content-Type: application/json; charset=utf-8
    {
      "date": "2015-04-24T14:10:40.483549122Z",
      "dyno": "web.1",
      "framework": {
          "name": "stdlib",
          "version": "go1.8.3"
      },
      "go":{
          "goarch": "amd64",
          "goos": "linux",
          "num_cpu": 4,
          "num_goroutines": 8,
          "version": "go1.8.3"
      },
      "language":{
          "name": "go",
          "version": "go1.8.3"
      }
    }