Images

Our images are resized

If the URL shows that the image is hosted in http://flockler.com/, it has been resized. You may use Flockler's thumbnail generator to resize the image to suit your needs.

Resizing images for your own needs

For example this image-url requests a 120px width image: http://flockler.com/thumbs/2931/000032_s120x0_noupscale.jpg

  • Format is [filename]_s[width]x[height](_noupscale).[file extension].
  • Noupscale in the end means that it won't be resized above its original size.

If you declare both, width and height, the image will be cropped:
http://flockler.com/thumbs/2931/000032_s480x480.jpg

Full-size images

To get a full-size image, replace /thumbs/ with /files/ in the image-url and remove the _s120x0_noupscale part.

Full-size of our example image:
http://flockler.com/files/2931/000032.jpg

Example script to set parameters to the image-url

You might want to use a helper method like this to make it easier to play with our image-urls:

function resetResizeEngineParameters(url, width, height) {
  var THUMB_PARAMS_REGEX = new RegExp("(_(s|c|l|m)\\d+x\\d+)+", "i");
  var QUALITY_PARAMS_REGEX = new RegExp("_q\d+", "i");
  var UPSCALE_PARAMS_REGEX = new RegExp("_noupscale", "i");
  url = url.replace(THUMB_PARAMS_REGEX, "_s" + width + "x" + height)
    .replace(QUALITY_PARAMS_REGEX, "")
    .replace(UPSCALE_PARAMS_REGEX, "");
  return url;
};

var image_url = "http://flockler.com/thumbs/2931/000032_s600x0_noupscale.jpg";
var resized_image_url = resetResizeEngineParameters(image_url, 120, 0);
// "http://flockler.com/thumbs/2931/000032_s120x0_noupscale.jpg"